pub struct TextRun {
pub text: String,
pub font_family: String,
pub font_weight: u16,
pub font_size: f32,
pub color: u32,
pub advances: Option<Vec<f32>>,
pub italic: bool,
pub underline: bool,
}Expand description
Styled text run. Font resolution + shaping land in a separate crate; this type only carries what the model needs to preserve (the string itself + structural + appearance metadata).
Fields§
§text: String§font_family: String§font_weight: u16§font_size: f32§color: u320xRRGGBBAA.
advances: Option<Vec<f32>>Optional explicit glyph-advance vector (PDF-style). If
None, the rasteriser shapes on the fly.
italic: bool§underline: boolTrait Implementations§
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