Type Alias read_fonts::tables::cmap::Cmap
source · pub type Cmap<'a> = TableRef<'a, CmapMarker>;
Expand description
Aliased Type§
struct Cmap<'a> { /* private fields */ }
Implementations§
source§impl<'a> Cmap<'a>
impl<'a> Cmap<'a>
sourcepub fn num_tables(&self) -> u16
pub fn num_tables(&self) -> u16
Number of encoding tables that follow.
pub fn encoding_records(&self) -> &'a [EncodingRecord]
source§impl<'a> Cmap<'a>
impl<'a> Cmap<'a>
sourcepub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
Map a codepoint to a nominal glyph identifier
This uses the first available subtable that provides a valid mapping.
§Note:
Mapping logic is currently only implemented for the most common subtable formats.