TextLayoutOptions
struct · ferroui-base · v0.5.0
struct TextLayoutOptions
The optional parameters of TextLayout::new. Default gives upstream's
parameter defaults.
Members
font_sizeforegroundtext_alignmenttext_wrappingtext_trimmingtext_decorationsflow_directionmax_widthmax_heightline_heightletter_spacingmax_linesfont_featurestext_style_overridestext_run_cache
font_size
font_size: f64
Size of the font.
foreground
foreground: Option<std::rc::Rc<dyn IBrush>>
The foreground.
text_alignment
text_alignment: crate::media::TextAlignment
The text alignment.
text_wrapping
text_wrapping: crate::media::TextWrapping
The text wrapping.
text_trimming
text_trimming: Option<std::rc::Rc<dyn TextTrimming>>
The text trimming (None means no trimming).
text_decorations
text_decorations: Option<crate::media::TextDecorationCollection>
The text decorations.
flow_direction
flow_direction: crate::media::FlowDirection
The text flow direction.
max_width
max_width: f64
The maximum width.
max_height
max_height: f64
The maximum height.
line_height
line_height: f64
The height of each line of text.
letter_spacing
letter_spacing: f64
The letter spacing that is applied to rendered glyphs.
max_lines
max_lines: i32
The maximum number of text lines.
font_features
font_features: Option<crate::media::FontFeatureCollection>
Optional list of turned on/off features.
text_style_overrides
text_style_overrides: Option<std::rc::Rc<[crate::utilities::ValueSpan<std::rc::Rc<dyn TextRunProperties>>]>>
The text style overrides.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.