VerticalMetricsTable
struct · ferroui-base · v0.5.0
struct VerticalMetricsTable
The vmtx (vertical metrics) table. Metrics are read lazily from the
table data; lookups never allocate.
The lookups return Err when the table is shorter than the header counts
promise (the reference implementation throws there).
Members
TAG_NAME
const TAG_NAME: &'static str
TAG
const TAG: OpenTypeTag
load
fn load(font: &dyn IFontMemory, number_of_v_metrics: u16, glyph_count: i32) -> Option<VerticalMetricsTable>
Loads the table; None when the font has no vmtx table.
try_get_metrics
fn try_get_metrics(self: &Self, glyph_index: u16) -> Result<Option<VerticalGlyphMetric>, FontTableError>
The metrics of a glyph; Ok(None) when the glyph index is out of range.
try_get_advance
fn try_get_advance(self: &Self, glyph_index: u16) -> Result<Option<u16>, FontTableError>
The advance of a glyph; Ok(None) when the glyph index is out of range.
try_get_advances
fn try_get_advances(self: &Self, glyph_indices: &[u16], advances: &mut [u16]) -> Result<bool, FontTableError>
Reads the advances of a batch of glyphs.
Ok(false) when advances is shorter than glyph_indices or a glyph
index is out of range (the advances before it are already written).
try_get_metrics_batch
fn try_get_metrics_batch(self: &Self, glyph_indices: &[u16], metrics: &mut [VerticalGlyphMetric]) -> Result<bool, FontTableError>
Reads the metrics of a batch of glyphs.
Ok(false) when metrics is shorter than glyph_indices or a glyph
index is out of range (the metrics before it are already written).
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.