pub struct OutlineGlyph { /* private fields */ }Expand description
A glyph defined by an outline.
Implementations§
Source§impl OutlineGlyph
impl OutlineGlyph
Sourcepub fn outline(&self) -> BezPath
pub fn outline(&self) -> BezPath
Return the outline of the glyph, assuming an upem value of 1000.
Sourcepub fn identifier(&self) -> GlyphIdentifier
pub fn identifier(&self) -> GlyphIdentifier
Return the identifier of the glyph. You can use this to calculate the cache key for the glyph.
Note that the glyph_transform attribute is not considered in the cache key of
the identifier, only the glyph ID and the font.
Sourcepub fn as_unicode(&self) -> Option<BfString>
pub fn as_unicode(&self) -> Option<BfString>
Returns the Unicode code point for this glyph, if available.
See Glyph::as_unicode for details on the fallback chain used.
Sourcepub fn font_data(&self) -> Option<OutlineFontData>
pub fn font_data(&self) -> Option<OutlineFontData>
Get raw font bytes and metadata for downstream use.
Returns None for Type1 fonts.
Sourcepub fn advance_width(&self) -> Option<f32>
pub fn advance_width(&self) -> Option<f32>
Get the advance width for this glyph.
The advance width is how far to move horizontally after drawing this glyph before drawing the next one.
Sourcepub fn font_cache_key(&self) -> u128
pub fn font_cache_key(&self) -> u128
Get the cache key for this glyph’s font.
This identifies the font uniquely, even when font_data() returns None
(e.g., for Type1 fonts). Useful for grouping glyphs by font.
Trait Implementations§
Source§impl Clone for OutlineGlyph
impl Clone for OutlineGlyph
Source§fn clone(&self) -> OutlineGlyph
fn clone(&self) -> OutlineGlyph
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more