FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextLayoutOptions

    struct · ferroui-base · v0.5.0

    struct TextLayoutOptions
    

    The optional parameters of TextLayout::new. Default gives upstream's parameter defaults.

    View source

    Members

    font_size

    font_size: f64
    

    Size of the font.

    Source

    foreground

    foreground: Option<std::rc::Rc<dyn IBrush>>
    

    The foreground.

    Source

    text_alignment

    text_alignment: crate::media::TextAlignment
    

    The text alignment.

    Source

    text_wrapping

    text_wrapping: crate::media::TextWrapping
    

    The text wrapping.

    Source

    text_trimming

    text_trimming: Option<std::rc::Rc<dyn TextTrimming>>
    

    The text trimming (None means no trimming).

    Source

    text_decorations

    text_decorations: Option<crate::media::TextDecorationCollection>
    

    The text decorations.

    Source

    flow_direction

    flow_direction: crate::media::FlowDirection
    

    The text flow direction.

    Source

    max_width

    max_width: f64
    

    The maximum width.

    Source

    max_height

    max_height: f64
    

    The maximum height.

    Source

    line_height

    line_height: f64
    

    The height of each line of text.

    Source

    letter_spacing

    letter_spacing: f64
    

    The letter spacing that is applied to rendered glyphs.

    Source

    max_lines

    max_lines: i32
    

    The maximum number of text lines.

    Source

    font_features

    font_features: Option<crate::media::FontFeatureCollection>
    

    Optional list of turned on/off features.

    Source

    text_style_overrides

    text_style_overrides: Option<std::rc::Rc<[crate::utilities::ValueSpan<std::rc::Rc<dyn TextRunProperties>>]>>
    

    The text style overrides.

    Source

    text_run_cache

    text_run_cache: Option<std::rc::Rc<crate::media::text_formatting::TextRunCache>>
    

    An optional cache for shaped text runs to avoid redundant shaping.

    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
    • Default

    Availability

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