pub struct TextRunStyle {
pub font_family: Option<Option<String>>,
pub font_weight: Option<u16>,
pub font_style: Option<FontStyle>,
pub font_scale: Option<Animated<f32>>,
pub letter_spacing: Option<f32>,
pub fill: Option<Paint>,
pub strokes: Option<Vec<TextStroke>>,
pub background_color: Option<Rgba>,
pub underline: Option<bool>,
pub line_through: Option<bool>,
}Expand description
A run’s changes to its holder’s text style, as an inline box’s own CSS properties. Each field set replaces the holder’s value for the run’s characters; a field left out keeps it. A change of family, weight, style, size or letter spacing shapes the run apart and can move line breaks; fill, strokes, background and decorations only paint.
Fields§
§font_family: Option<Option<String>>The family, as a text style’s font_family; null draws from the fallback order alone.
font_weight: Option<u16>The weight in [1, 1000], as a text style’s font_weight.
font_style: Option<FontStyle>The face style, as a text style’s font_style.
font_scale: Option<Animated<f32>>The run’s size as a multiple of the text’s font size, in [0.1, 10], as CSS
font-size: <n>em. Lines are laid out again when it changes; keyframes are in the
holder’s time.
letter_spacing: Option<f32>Space after each character, as a fraction of the run’s size, in [-0.5, 1].
fill: Option<Paint>What paints the run’s glyphs; gradient positions are in the text’s layout box, as the text’s fill.
strokes: Option<Vec<TextStroke>>The run’s bands, as a text style’s strokes, widths in fractions of the run’s size.
background_color: Option<Rgba>A box behind the run on each line, its advances wide and its em box tall, as CSS
background-color paints an inline box.
underline: Option<bool>§line_through: Option<bool>