pub struct LayoutTextStyle {
pub font_family: Option<String>,
pub font_size: f32,
pub fill: Paint,
pub line_height: f32,
pub letter_spacing: f32,
pub font_weight: u16,
pub text_align: TextAlign,
pub strokes: Vec<TextStroke>,
pub shadows: Vec<TextShadow>,
}Expand description
A box’s text style once inherited. Lengths are fractions of the picture’s shorter side.
Fields§
§font_family: Option<String>The family the text draws in, as a text style’s font_family.
font_size: f32Font size as a fraction of the picture’s shorter side.
fill: PaintWhat paints the glyphs, a gradient in the text’s layout box.
line_height: f32Baseline-to-baseline distance in font sizes.
letter_spacing: f32Space after each character, a fraction of the font size.
font_weight: u16The weight its faces are matched by.
text_align: TextAlignHow lines align within the content width.
strokes: Vec<TextStroke>Bands around the glyphs, innermost first; widths are fractions of the font size.
shadows: Vec<TextShadow>Shadows of the glyphs and strokes, the first on top; lengths are fractions of the font size.
Trait Implementations§
Source§impl Clone for LayoutTextStyle
impl Clone for LayoutTextStyle
Source§impl Debug for LayoutTextStyle
impl Debug for LayoutTextStyle
Source§impl PartialEq for LayoutTextStyle
impl PartialEq for LayoutTextStyle
impl StructuralPartialEq for LayoutTextStyle
Auto Trait Implementations§
impl Freeze for LayoutTextStyle
impl RefUnwindSafe for LayoutTextStyle
impl Send for LayoutTextStyle
impl Sync for LayoutTextStyle
impl Unpin for LayoutTextStyle
impl UnsafeUnpin for LayoutTextStyle
impl UnwindSafe for LayoutTextStyle
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