pub enum CmapSubtable<'a> {
Format0(Cmap0<'a>),
Format2(Cmap2<'a>),
Format4(Cmap4<'a>),
Format6(Cmap6<'a>),
Format8(Cmap8<'a>),
Format10(Cmap10<'a>),
Format12(Cmap12<'a>),
Format13(Cmap13<'a>),
Format14(Cmap14<'a>),
}Expand description
The different cmap subtable formats.
Variants§
Format0(Cmap0<'a>)
Format2(Cmap2<'a>)
Format4(Cmap4<'a>)
Format6(Cmap6<'a>)
Format8(Cmap8<'a>)
Format10(Cmap10<'a>)
Format12(Cmap12<'a>)
Format13(Cmap13<'a>)
Format14(Cmap14<'a>)
Implementations§
Source§impl<'a> CmapSubtable<'a>
impl<'a> CmapSubtable<'a>
Source§impl<'a> CmapSubtable<'a>
impl<'a> CmapSubtable<'a>
pub fn language(&self) -> u32
Sourcepub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
Attempts to map the given codepoint to a nominal glyph identifier using the underlying subtable.
Sourcepub fn iter(&self) -> CmapSubtableIter<'a> ⓘ
pub fn iter(&self) -> CmapSubtableIter<'a> ⓘ
Returns an iterator over all (codepoint, glyph identifier) pairs in the subtable.
Malicious and malformed fonts can produce a large number of invalid
pairs. Use Self::iter_with_limits to generate a pruned sequence
that is limited to reasonable values.
Sourcepub fn iter_with_limits(&self, limits: CmapIterLimits) -> CmapSubtableIter<'a> ⓘ
pub fn iter_with_limits(&self, limits: CmapIterLimits) -> CmapSubtableIter<'a> ⓘ
Returns an iterator over all (codepoint, glyph identifier) pairs in the subtable within the given limits.
Trait Implementations§
Source§impl<'a> Clone for CmapSubtable<'a>
impl<'a> Clone for CmapSubtable<'a>
Source§fn clone(&self) -> CmapSubtable<'a>
fn clone(&self) -> CmapSubtable<'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 moreSource§impl<'a> FontRead<'a> for CmapSubtable<'a>
impl<'a> FontRead<'a> for CmapSubtable<'a>
Source§impl MinByteRange for CmapSubtable<'_>
impl MinByteRange for CmapSubtable<'_>
Auto Trait Implementations§
impl<'a> Freeze for CmapSubtable<'a>
impl<'a> RefUnwindSafe for CmapSubtable<'a>
impl<'a> Send for CmapSubtable<'a>
impl<'a> Sync for CmapSubtable<'a>
impl<'a> Unpin for CmapSubtable<'a>
impl<'a> UnwindSafe for CmapSubtable<'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