FontFallbackMapping
struct · ferroui-base · v0.5.0
struct FontFallbackMapping
The font and scale selected for a nonempty prefix of logical UTF-16 text. The scale is relative to the source font size; it is never cumulative.
Members
new
fn new(glyph_typeface: Rc<GlyphTypeface>, mapped_length: usize, scale: f64) -> Option<Self>
Creates a mapping with a finite positive scale and a nonzero length.
Returns None for invalid values or an unnamed glyph face. The
formatter additionally checks the length against the offered text,
Unicode boundaries, glyph coverage and the effective em size.
glyph_typeface
fn glyph_typeface(self: &Self) -> &Rc<GlyphTypeface>
The actual selected face, retained for shaping and rendering.
typeface
fn typeface(self: &Self) -> &Typeface
Descriptive face metadata. Shaping uses the retained actual glyph face.
mapped_length
fn mapped_length(self: &Self) -> usize
The nonempty prefix length in logical UTF-16 code units.
scale
fn scale(self: &Self) -> f64
A finite positive multiplier of the source's requested font size.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.