pub struct TextStyle {
pub font: Option<FontId>,
pub content: String,
pub size: f32,
pub weight: u16,
pub color: Color,
pub line_height: f32,
pub align: TextAlign,
}Expand description
A Text’s text and how it is set.
Fields§
§font: Option<FontId>The font file the text is set in, the face its weight picked; None
for Inter.
content: StringWhat the text says: the element’s text, each {prop} in it filled
in — a number as Rust prints it.
size: f32The font size, in pixels.
weight: u16The font weight: 100 to 900, in steps of 100.
color: ColorThe text’s color.
line_height: f32The height of a line, as a multiple of size.
align: TextAlignHow each line sits across the text’s box.
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Forget for TextStyle
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