pub struct TextRun {
pub quads: Vec<GlyphQuad>,
pub lines: Vec<TextLine>,
pub width: f64,
pub height: f64,
pub ascent: f64,
pub descent: f64,
pub line_height: f64,
pub line_count: usize,
}Expand description
A shaped run of text: the glyph quads that draw it, plus the metrics of the run as a whole.
Fields§
§quads: Vec<GlyphQuad>The glyph quads, in reading order.
lines: Vec<TextLine>The lines of the run, with the position of each baseline.
width: f64The advance width of the whole run.
height: f64The height of the whole run.
ascent: f64The distance from the run’s top to the first baseline.
descent: f64The distance from the last baseline down to the bottom of the lowest glyph.
line_height: f64The distance between two consecutive baselines.
line_count: usizeThe number of lines in the run.
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