Skip to main content

ResolvedTextStyle

Type Alias ResolvedTextStyle 

Source
pub type ResolvedTextStyle = TextStyle<ResolvedFamily>;
Expand description

Inherited typography kept per node during a layout pass.

Aliased Type§

pub struct ResolvedTextStyle {
Show 14 fields pub color: Rgba, pub font_family: ResolvedFamily, pub font_size: f32, pub font_weight: u16, pub font_style: FontStyle, pub letter_spacing: f32, pub line_height: Length, pub white_space: WhiteSpace, pub word_break: WordBreak, pub overflow_wrap: OverflowWrap, pub text_align: TextAlign, pub text_decoration: TextDecoration, pub vertical_align: VerticalAlign, pub max_lines: u32,
}

Fields§

§color: Rgba§font_family: ResolvedFamily

CSS font-family list as authored; empty = the host’s default UI font.

§font_size: f32

Logical points, finite and >= 0.

§font_weight: u16

CSS weight (100..=900 once a host clamps it).

§font_style: FontStyle§letter_spacing: f32

Extra advance after every character, logical points.

§line_height: Length

Points = absolute; percent = unit-less multiplier × 100 of font_size; auto = normal.

§white_space: WhiteSpace§word_break: WordBreak§overflow_wrap: OverflowWrap§text_align: TextAlign§text_decoration: TextDecoration§vertical_align: VerticalAlign§max_lines: u32

Maximum painted lines (0 = unlimited); measured height never exceeds them.

Implementations§

Source§

impl ResolvedTextStyle

Source

pub fn in_store<'a>(&self, store: &'a NodeStore) -> TextStyle<&'a str>

The measurer view of this style, its family read from store.