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>

source

pub fn version(&self) -> u16

Table version number (0).

source

pub fn num_tables(&self) -> u16

Number of encoding tables that follow.

source

pub fn encoding_records(&self) -> &'a [EncodingRecord]

source§

impl<'a> Cmap<'a>

source

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.

source

pub fn closure_glyphs( &self, unicodes: &IntSet<u32>, glyph_set: &mut IntSet<GlyphId>, )

Trait Implementations§

source§

impl<'a> Debug for Cmap<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> FontRead<'a> for Cmap<'a>

source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of Self from the provided data, performing validation. Read more
source§

impl<'a> SomeTable<'a> for Cmap<'a>

source§

fn type_name(&self) -> &str

The name of this table
source§

fn get_field(&self, idx: usize) -> Option<Field<'a>>

Access this table’s fields, in declaration order.
source§

impl TopLevelTable for Cmap<'_>

source§

const TAG: Tag = _

cmap