pub(crate) struct FontAt<'a> {
pub(crate) context: GlyfContext<'a>,
pub(crate) coords: &'a [F2Dot14],
}Expand description
A font read at a location other than its own.
A VARC component defines its own coordinates, so its glyph is loaded
through this type rather than the font. The font’s cached scalars only
apply to its own location, so this type does not provide them.
Fields§
§context: GlyfContext<'a>§coords: &'a [F2Dot14]Trait Implementations§
impl<'a> Copy for FontAt<'a>
Source§impl<'a> OutlineContext<'a> for FontAt<'a>
impl<'a> OutlineContext<'a> for FontAt<'a>
Source§fn glyph(&self, glyph: GlyphId) -> Option<LocaGlyph<'a>>
fn glyph(&self, glyph: GlyphId) -> Option<LocaGlyph<'a>>
Returns the glyph with the given identifier, or
None if it is empty.Source§fn glyph_variation_data(&self, glyph: GlyphId) -> Option<GlyphVariationData<'a>>
fn glyph_variation_data(&self, glyph: GlyphId) -> Option<GlyphVariationData<'a>>
Variation data for a glyph, or
None if the font does not vary or the
glyph has none.Source§fn has_gvar(&self) -> bool
fn has_gvar(&self) -> bool
True if the font has a
gvar table, whatever any one glyph has in it. Read moreSource§fn phantom_point_deltas(&self, glyph: GlyphId) -> Option<[Point<Fixed>; 4]>
fn phantom_point_deltas(&self, glyph: GlyphId) -> Option<[Point<Fixed>; 4]>
Variation deltas for a glyph’s four phantom points. Read more
Source§fn coords(&self) -> &[F2Dot14]
fn coords(&self) -> &[F2Dot14]
Normalized variation coordinates, empty for the default instance. Read more
Source§fn units_per_em(&self) -> u16
fn units_per_em(&self) -> u16
Design units per em.
Source§fn h_metrics(&self, glyph: GlyphId) -> (i32, i32)
fn h_metrics(&self, glyph: GlyphId) -> (i32, i32)
Left side bearing and advance width, in font units. Read more
Source§fn v_metrics(&self, glyph: GlyphId) -> Option<(i32, i32)>
fn v_metrics(&self, glyph: GlyphId) -> Option<(i32, i32)>
Top side bearing and vertical advance for a glyph, in font units. Read more
Source§fn h_line_metrics(&self) -> (i32, i32)
fn h_line_metrics(&self) -> (i32, i32)
The ascender and descender of the line horizontal text sits on, in
font units. Read more
Source§fn gvar_scalars(&self) -> &[Fixed]
fn gvar_scalars(&self) -> &[Fixed]
Scalars for
gvar’s shared tuples at Self::coords, as
SelectedGvar::compute_scalars fills them. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for FontAt<'a>
impl<'a> !UnwindSafe for FontAt<'a>
impl<'a> Freeze for FontAt<'a>
impl<'a> Send for FontAt<'a>
impl<'a> Sync for FontAt<'a>
impl<'a> Unpin for FontAt<'a>
impl<'a> UnsafeUnpin for FontAt<'a>
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