pub struct TextStyle {
pub family: FontFamily,
pub weight: FontWeight,
pub style: FontStyle,
pub size: f32,
pub color: Color,
pub letter_spacing: f32,
pub line_height: LineHeight,
pub align: TextAlign,
}Expand description
Styling applied uniformly to a laid-out string.
Fields§
§family: FontFamilyFont family (or fallback stack).
weight: FontWeightFont weight.
style: FontStyleFont style (upright/italic/oblique).
size: f32Font size in logical pixels.
color: ColorFill color for the glyphs.
letter_spacing: f32Extra spacing between letters, in logical pixels.
line_height: LineHeightLine height.
align: TextAlignParagraph alignment. Defaults to TextAlign::Start.
Implementations§
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe 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