pub struct Charset<'a> { /* private fields */ }
Expand description
Character set for mapping from glyph to string identifiers.
See https://adobe-type-tools.github.io/font-tech-notes/pdfs/5176.CFF.pdf#page=21
Implementations§
Source§impl<'a> Charset<'a>
impl<'a> Charset<'a>
pub fn new( cff_data: FontData<'a>, charset_offset: usize, num_glyphs: u32, ) -> Result<Self, ReadError>
pub fn kind(&self) -> &CharsetKind<'a>
pub fn num_glyphs(&self) -> u32
Sourcepub fn string_id(&self, glyph_id: GlyphId) -> Result<StringId, ReadError>
pub fn string_id(&self, glyph_id: GlyphId) -> Result<StringId, ReadError>
Returns the string identifier for the given glyph identifier.
Sourcepub fn iter(&self) -> CharsetIter<'a> ⓘ
pub fn iter(&self) -> CharsetIter<'a> ⓘ
Returns an iterator over all of the glyph and string identifier mappings.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Charset<'a>
impl<'a> RefUnwindSafe for Charset<'a>
impl<'a> Send for Charset<'a>
impl<'a> Sync for Charset<'a>
impl<'a> Unpin for Charset<'a>
impl<'a> UnwindSafe for Charset<'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