pub(crate) struct Subfont {
is_cff2: bool,
scale: Option<Fixed>,
subrs_offset: Option<usize>,
pub(crate) hint_state: HintState,
store_index: u16,
}
Expand description
Specifies local subroutines and hinting parameters for some subset of glyphs in a CFF or CFF2 table.
This type is designed to be cacheable to avoid re-evaluating the private dict every time a charstring is processed.
For variable fonts, this is dependent on a location in variation space.
Fields§
§is_cff2: bool
§scale: Option<Fixed>
§subrs_offset: Option<usize>
§hint_state: HintState
§store_index: u16
Implementations§
Source§impl Subfont
impl Subfont
Sourcepub fn subrs<'a>(
&self,
scaler: &Outlines<'a>,
) -> Result<Option<Index<'a>>, Error>
pub fn subrs<'a>( &self, scaler: &Outlines<'a>, ) -> Result<Option<Index<'a>>, Error>
Returns the local subroutine index.
Sourcepub fn blend_state<'a>(
&self,
scaler: &Outlines<'a>,
coords: &'a [F2Dot14],
) -> Result<Option<BlendState<'a>>, Error>
pub fn blend_state<'a>( &self, scaler: &Outlines<'a>, coords: &'a [F2Dot14], ) -> Result<Option<BlendState<'a>>, Error>
Creates a new blend state for the given normalized variation coordinates.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subfont
impl RefUnwindSafe for Subfont
impl Send for Subfont
impl Sync for Subfont
impl Unpin for Subfont
impl UnwindSafe for Subfont
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more