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 Cmap<'_>
impl Cmap<'_>
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.
pub fn closure_glyphs( &self, unicodes: &IntSet<u32>, glyph_set: &mut IntSet<GlyphId>, )
Source§impl<'a, T> TableRef<'a, T>
impl<'a, T> TableRef<'a, T>
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.