pub struct TextLayoutOptions {Show 15 fields
pub font_size: f64,
pub foreground: Option<Rc<dyn IBrush>>,
pub text_alignment: TextAlignment,
pub text_wrapping: TextWrapping,
pub text_trimming: Option<Rc<dyn TextTrimming>>,
pub text_decorations: Option<TextDecorationCollection>,
pub flow_direction: FlowDirection,
pub max_width: f64,
pub max_height: f64,
pub line_height: f64,
pub letter_spacing: f64,
pub max_lines: i32,
pub font_features: Option<FontFeatureCollection>,
pub text_style_overrides: Option<Rc<[ValueSpan<Rc<dyn TextRunProperties>>]>>,
pub text_run_cache: Option<Rc<TextRunCache>>,
}Expand description
The optional parameters of TextLayout::new. Default gives upstream’s
parameter defaults.
Fields§
§font_size: f64Size of the font.
foreground: Option<Rc<dyn IBrush>>The foreground.
text_alignment: TextAlignmentThe text alignment.
text_wrapping: TextWrappingThe text wrapping.
text_trimming: Option<Rc<dyn TextTrimming>>The text trimming (None means no trimming).
text_decorations: Option<TextDecorationCollection>The text decorations.
flow_direction: FlowDirectionThe text flow direction.
max_width: f64The maximum width.
max_height: f64The maximum height.
line_height: f64The height of each line of text.
letter_spacing: f64The letter spacing that is applied to rendered glyphs.
max_lines: i32The maximum number of text lines.
font_features: Option<FontFeatureCollection>Optional list of turned on/off features.
text_style_overrides: Option<Rc<[ValueSpan<Rc<dyn TextRunProperties>>]>>The text style overrides.
text_run_cache: Option<Rc<TextRunCache>>An optional cache for shaped text runs to avoid redundant shaping.
Trait Implementations§
Source§impl Clone for TextLayoutOptions
impl Clone for TextLayoutOptions
Auto Trait Implementations§
impl !RefUnwindSafe for TextLayoutOptions
impl !Send for TextLayoutOptions
impl !Sync for TextLayoutOptions
impl !UnwindSafe for TextLayoutOptions
impl Freeze for TextLayoutOptions
impl Unpin for TextLayoutOptions
impl UnsafeUnpin for TextLayoutOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more