FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    glyph_typeface

    fn glyph_typeface(self: &Self) -> &Rc<GlyphTypeface>
    

    The actual selected face, retained for shaping and rendering.

    Source

    typeface

    fn typeface(self: &Self) -> &Typeface
    

    Descriptive face metadata. Shaping uses the retained actual glyph face.

    Source

    mapped_length

    fn mapped_length(self: &Self) -> usize
    

    The nonempty prefix length in logical UTF-16 code units.

    Source

    scale

    fn scale(self: &Self) -> f64
    

    A finite positive multiplier of the source's requested font size.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.