pub struct ResolvedTextStyle {Show 17 fields
pub color: Color,
pub font_size: Points,
pub font_weight: u16,
pub line_height: Points,
pub font_family: Option<FontFamily>,
pub italic: bool,
pub letter_spacing: Points,
pub line_height_multiple: f32,
pub decoration: TextDecoration,
pub decoration_color: Option<Color>,
pub decoration_style: DecorationStyle,
pub decoration_thickness: Option<Points>,
pub underline_offset: Option<Points>,
pub transform: TextTransform,
pub font_variant: FontVariant,
pub background: Option<TextBackground>,
pub hidden: bool,
}Expand description
Fully resolved character style of a text run.
Fields§
§color: ColorForeground color.
font_size: PointsFont size.
font_weight: u16Font weight, 100..=900.
line_height: PointsLine height; zero means the font’s natural line height.
font_family: Option<FontFamily>Font family; None is the system font.
italic: boolItalic.
letter_spacing: PointsExtra space between characters.
line_height_multiple: f32A line height set as a multiple of the font size (0: none), kept so nested text with another size gets its own line height.
decoration: TextDecorationUnderline / strikethrough.
decoration_color: Option<Color>Color of the decoration lines; None uses color.
decoration_style: DecorationStyleHow the decoration lines are drawn.
decoration_thickness: Option<Points>Thickness of the decoration lines; None is the font’s.
underline_offset: Option<Points>Distance of the underline below the baseline; None is the font’s.
transform: TextTransformCase transform (applied by the core when building the text).
font_variant: FontVariantOpenType features (fontVariant).
background: Option<TextBackground>The background of the nested text this run is in (drawing only).
Hidden but laid out (visibility: "hidden" on the nested text this
run is in, or on one around it): its characters keep their place in
the lines, are not drawn (the core makes the run transparent, with
no background) and are left out of copies and of what screen readers
read (AttributedText::copied_text, AttributedText::visible_text).