FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextMetrics

    struct · ferroui-base · v0.5.0

    struct TextMetrics
    

    A metric that holds information about text specific measurements.

    View source

    Members

    font_rendering_em_size

    font_rendering_em_size: f64
    

    Em size of font used to format and display text.

    Source

    baseline

    baseline: f64
    

    Gets the recommended distance from the top of the text to the baseline.

    Source

    ascent

    ascent: f64
    

    Gets the recommended distance above the baseline.

    Source

    descent

    descent: f64
    

    Gets the recommended distance under the baseline.

    Source

    line_gap

    line_gap: f64
    

    Gets the recommended additional space between two lines of text.

    Source

    cap_height

    cap_height: f64
    

    The height of the capital letters above the baseline (positive; a FerroUI addition, FontMetrics::cap_height).

    Source

    line_height

    line_height: f64
    

    Gets the recommended line height.

    Source

    underline_thickness

    underline_thickness: f64
    

    Gets a value that indicates the thickness of the underline.

    Source

    underline_position

    underline_position: f64
    

    Gets a value that indicates the distance of the underline from the baseline.

    Source

    strikethrough_thickness

    strikethrough_thickness: f64
    

    Gets a value that indicates the thickness of the strikethrough.

    Source

    strikethrough_position

    strikethrough_position: f64
    

    Gets a value that indicates the distance of the strikethrough from the baseline.

    Source

    new

    fn new(glyph_typeface: &GlyphTypeface, font_rendering_em_size: f64) -> Self
    

    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.