Type Alias TextStyle2

Source
pub type TextStyle2 = ParleyTextStyle<'static, ColorBrush>;
Expand description

Text style.

To use it, first add a TextStyle2 into a Text with Text::add_style(), and get a StyleHandle back. Then, use [TextBox::set_style()] to make a text box use the style.

Aliased Type§

struct TextStyle2 {
Show 22 fields pub font_stack: FontStack<'static>, pub font_size: f32, pub font_width: FontWidth, pub font_style: FontStyle, pub font_weight: FontWeight, pub font_variations: FontSettings<'static, Setting<f32>>, pub font_features: FontSettings<'static, Setting<u16>>, pub locale: Option<&'static str>, pub brush: ColorBrush, pub has_underline: bool, pub underline_offset: Option<f32>, pub underline_size: Option<f32>, pub underline_brush: Option<ColorBrush>, pub has_strikethrough: bool, pub strikethrough_offset: Option<f32>, pub strikethrough_size: Option<f32>, pub strikethrough_brush: Option<ColorBrush>, pub line_height: LineHeight, pub word_spacing: f32, pub letter_spacing: f32, pub word_break: WordBreakStrength, pub overflow_wrap: OverflowWrap,
}

Fields§

§font_stack: FontStack<'static>

Font family stack.

§font_size: f32

Font size.

§font_width: FontWidth

Font width.

§font_style: FontStyle

Font style.

§font_weight: FontWeight

Font weight.

§font_variations: FontSettings<'static, Setting<f32>>

Font variation settings.

§font_features: FontSettings<'static, Setting<u16>>

Font feature settings.

§locale: Option<&'static str>

Locale.

§brush: ColorBrush

Brush for rendering text.

§has_underline: bool

Underline decoration.

§underline_offset: Option<f32>

Offset of the underline decoration.

§underline_size: Option<f32>

Size of the underline decoration.

§underline_brush: Option<ColorBrush>

Brush for rendering the underline decoration.

§has_strikethrough: bool

Strikethrough decoration.

§strikethrough_offset: Option<f32>

Offset of the strikethrough decoration.

§strikethrough_size: Option<f32>

Size of the strikethrough decoration.

§strikethrough_brush: Option<ColorBrush>

Brush for rendering the strikethrough decoration.

§line_height: LineHeight

Line height.

§word_spacing: f32

Extra spacing between words.

§letter_spacing: f32

Extra spacing between letters.

§word_break: WordBreakStrength

Control over where words can wrap.

§overflow_wrap: OverflowWrap

Control over “emergency” line-breaking.