pub struct GlyphNames<'a> {
inner: Inner<'a>,
}
Expand description
Mapping from glyph identifiers to names.
This sources glyph names from the post
and CFF
tables in that order.
If glyph names are not available in either, then they are synthesized
as gidDDD
where DDD
is the glyph identifier in decimal. Use the
source
to determine which source was chosen.
Fields§
§inner: Inner<'a>
Implementations§
Source§impl<'a> GlyphNames<'a>
impl<'a> GlyphNames<'a>
Sourcepub fn new(font: &FontRef<'a>) -> Self
pub fn new(font: &FontRef<'a>) -> Self
Creates a new object for accessing glyph names from the given font.
Sourcepub fn source(&self) -> GlyphNameSource
pub fn source(&self) -> GlyphNameSource
Returns the chosen source for glyph names.
Sourcepub fn num_glyphs(&self) -> u32
pub fn num_glyphs(&self) -> u32
Returns the number of glyphs in the font.
Trait Implementations§
Source§impl<'a> Clone for GlyphNames<'a>
impl<'a> Clone for GlyphNames<'a>
Source§fn clone(&self) -> GlyphNames<'a>
fn clone(&self) -> GlyphNames<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for GlyphNames<'a>
impl<'a> RefUnwindSafe for GlyphNames<'a>
impl<'a> Send for GlyphNames<'a>
impl<'a> Sync for GlyphNames<'a>
impl<'a> Unpin for GlyphNames<'a>
impl<'a> UnwindSafe for GlyphNames<'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