pub struct TextRun {
pub text: String,
pub size: f32,
pub weight: FontWeight,
pub italic: bool,
pub color: Color,
pub decoration: TextDecoration,
pub decoration_color: Option<Color>,
pub letter_spacing: f32,
}Expand description
Type as the renderer receives it, and the framework’s defaults. A text run ready to render: a fragment plus its typographic attributes and colour, all resolved — nothing left to inherit.
Fields§
§text: StringThe run’s text.
size: f32The font size, in logical pixels.
weight: FontWeightThe font weight.
italic: boolWhether the run is italic.
color: ColorThe run’s colour.
decoration: TextDecorationThe run’s decoration lines (no effect on measurement).
decoration_color: Option<Color>Decoration colour; None means the run’s own colour.
letter_spacing: f32The room added after every character, in logical pixels; 0 for none.
Trait Implementations§
impl StructuralPartialEq for TextRun
Auto Trait Implementations§
impl Freeze for TextRun
impl RefUnwindSafe for TextRun
impl Send for TextRun
impl Sync for TextRun
impl Unpin for TextRun
impl UnsafeUnpin for TextRun
impl UnwindSafe for TextRun
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