pub(crate) struct SfntUnicodeCharmap<'a> {
cmap: UnicodeSubtables<'a>,
dmap: UnicodeSubtables<'a>,
}Expand description
The selected cmap subtables and the metadata needed to use them.
Fields§
§cmap: UnicodeSubtables<'a>§dmap: UnicodeSubtables<'a>Implementations§
Source§impl<'a> SfntUnicodeCharmap<'a>
impl<'a> SfntUnicodeCharmap<'a>
pub(crate) fn read(font: &impl TableProvider<'a>) -> Self
pub(crate) fn map(&self, codepoint: u32) -> Option<GlyphId>
Sourcefn map_batched<'o>(
&self,
codepoints: impl Iterator<Item = (u32, &'o mut GlyphId)>,
) -> usize
fn map_batched<'o>( &self, codepoints: impl Iterator<Item = (u32, &'o mut GlyphId)>, ) -> usize
Writes the mapping of each codepoint to its slot and returns the number of initial consecutive nonzero mappings.
DMAP overrides cmap codepoint by codepoint, so only a font without
one runs through the cached lookups of a single subtable.
pub(crate) fn map_variant( &self, codepoint: u32, selector: u32, ) -> Option<GlyphId>
fn iter( &self, limits: CmapIterLimits, ) -> impl Iterator<Item = (u32, GlyphId)> + '_
fn variant_mappings( &self, limits: CmapIterLimits, ) -> impl Iterator<Item = (u32, u32, MapVariant)> + '_
Trait Implementations§
Source§impl<'a> Clone for SfntUnicodeCharmap<'a>
impl<'a> Clone for SfntUnicodeCharmap<'a>
Source§fn clone(&self) -> SfntUnicodeCharmap<'a>
fn clone(&self) -> SfntUnicodeCharmap<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Default for SfntUnicodeCharmap<'a>
impl<'a> Default for SfntUnicodeCharmap<'a>
Source§fn default() -> SfntUnicodeCharmap<'a>
fn default() -> SfntUnicodeCharmap<'a>
Returns the “default value” for a type. Read more
Source§impl<'yoke> Yokeable<'yoke> for SfntUnicodeCharmap<'static>
impl<'yoke> Yokeable<'yoke> for SfntUnicodeCharmap<'static>
Source§type Output = SfntUnicodeCharmap<'yoke>
type Output = SfntUnicodeCharmap<'yoke>
This type MUST be
Self with the 'static replaced with 'a, i.e. Self<'a>Source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
Auto Trait Implementations§
impl<'a> Freeze for SfntUnicodeCharmap<'a>
impl<'a> RefUnwindSafe for SfntUnicodeCharmap<'a>
impl<'a> Send for SfntUnicodeCharmap<'a>
impl<'a> Sync for SfntUnicodeCharmap<'a>
impl<'a> Unpin for SfntUnicodeCharmap<'a>
impl<'a> UnsafeUnpin for SfntUnicodeCharmap<'a>
impl<'a> UnwindSafe for SfntUnicodeCharmap<'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