pub struct TextStyle {Show 20 fields
pub color: Option<Color>,
pub decoration: Option<TextDecoration>,
pub decoration_color: Option<Color>,
pub decoration_style: Option<TextDecorationStyle>,
pub decoration_thickness: Option<f64>,
pub font_weight: Option<FontWeight>,
pub font_style: Option<FontStyle>,
pub text_baseline: Option<TextBaseline>,
pub font_family: Option<String>,
pub font_family_fallback: Option<Vec<String>>,
pub font_size: Option<f64>,
pub letter_spacing: Option<f64>,
pub word_spacing: Option<f64>,
pub height: Option<f64>,
pub leading_distribution: Option<TextLeadingDistribution>,
pub background: Option<Paint>,
pub foreground: Option<Paint>,
pub shadows: Option<Vec<Shadow>>,
pub font_features: Option<Vec<FontFeature>>,
pub font_variations: Option<Vec<FontVariation>>,
}Expand description
An opaque object that determines the size, position, and rendering of text.
Every field is optional, as in Dart: a field left None inherits from the style below it
on the ParagraphBuilder’s stack, or from the paragraph style.
Fields§
§color: Option<Color>§decoration: Option<TextDecoration>§decoration_color: Option<Color>§decoration_style: Option<TextDecorationStyle>§decoration_thickness: Option<f64>§font_weight: Option<FontWeight>§font_style: Option<FontStyle>§text_baseline: Option<TextBaseline>§font_family: Option<String>§font_family_fallback: Option<Vec<String>>§font_size: Option<f64>§letter_spacing: Option<f64>§word_spacing: Option<f64>§height: Option<f64>§leading_distribution: Option<TextLeadingDistribution>§background: Option<Paint>§foreground: Option<Paint>§shadows: Option<Vec<Shadow>>§font_features: Option<Vec<FontFeature>>§font_variations: Option<Vec<FontVariation>>Implementations§
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl !RefUnwindSafe for TextStyle
impl !UnwindSafe for TextStyle
impl Freeze for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
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