FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FontMetrics

    struct · ferroui-base · v0.5.0

    struct FontMetrics
    

    The font metrics is holding information about a font's ascent, descent, etc. in design em units.

    View source

    Members

    design_em_height

    design_em_height: u16
    

    The font design units per em.

    Source

    is_fixed_pitch

    is_fixed_pitch: bool
    

    Whether all glyphs have the same advance.

    Source

    ascent

    ascent: i32
    

    The recommended distance above the baseline in design em size.

    Source

    descent

    descent: i32
    

    The recommended distance under the baseline in design em size.

    Source

    line_gap

    line_gap: i32
    

    The recommended additional space between two lines of text in design em size.

    Source

    underline_position

    underline_position: i32
    

    A value that indicates the distance of the underline from the baseline in design em size.

    Source

    underline_thickness

    underline_thickness: i32
    

    A value that indicates the thickness of the underline in design em size.

    Source

    strikethrough_position

    strikethrough_position: i32
    

    A value that indicates the distance of the strikethrough from the baseline in design em size.

    Source

    strikethrough_thickness

    strikethrough_thickness: i32
    

    A value that indicates the thickness of the strikethrough in design em size.

    Source

    cap_height

    cap_height: i32
    

    The height of the capital letters above the baseline in design em size (positive). A FerroUI addition (docs/porting/DEVIATIONS.md, Fonts): the sCapHeight of the OS/2 table, or the top of the glyph of "H" for a font whose table has none.

    Source

    line_spacing

    fn line_spacing(self: &Self) -> i32
    

    The line spacing in the design em size (descent - ascent + line_gap).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq

    Availability

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