pub struct GlyphRun<'a> {
pub font: &'a Font,
pub px: f32,
pub color: Color,
pub glyphs: &'a [PositionedGlyph],
}Expand description
Consecutive glyphs sharing one font, size and color: what a layout hands a renderer.
The common currency between text layout (which produces runs) and rendering (which draws them), so neither depends on the other.
Fields§
§font: &'a FontThe face the glyph ids belong to.
px: f32Size in pixels per em.
color: ColorText color.
glyphs: &'a [PositionedGlyph]The glyphs, in drawing order.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GlyphRun<'a>
impl<'a> !UnwindSafe for GlyphRun<'a>
impl<'a> Freeze for GlyphRun<'a>
impl<'a> Send for GlyphRun<'a>
impl<'a> Sync for GlyphRun<'a>
impl<'a> Unpin for GlyphRun<'a>
impl<'a> UnsafeUnpin for GlyphRun<'a>
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