CmapFormat12Or13Table
struct · ferroui-base · v0.5.0
struct CmapFormat12Or13Table
A format 12 (segmented coverage) or format 13 (many-to-one) cmap subtable.
Lookups read the table data lazily and never allocate.
Members
new
fn new(table: ReadOnlyMemory<u8>) -> Result<Self, FontTableError>
Parses the subtable header; Err when the header is truncated.
format
fn format(self: &Self) -> CmapFormat
language
fn language(self: &Self) -> u32
get_glyph
fn get_glyph(self: &Self, code_point: i32) -> u16
The glyph for the code point, 0 when it is not mapped.
contains_glyph
fn contains_glyph(self: &Self, code_point: i32) -> bool
get_glyphs
fn get_glyphs(self: &Self, code_points: &[i32], glyph_ids: &mut [u16])
Maps every code point to its glyph (0 when unmapped).
Panics when glyph_ids is shorter than code_points.
try_get_glyph
fn try_get_glyph(self: &Self, code_point: i32) -> Option<u16>
The glyph for the code point; None when it is not mapped or maps to
glyph 0.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.