pub struct Glyph {
pub chr: char,
pub id: Option<GlyphId>,
pub pos: Vec2,
pub advance: f32,
pub ascent: f32,
}Expand description
One placed glyph. A layout records the character a glyph stands for, not
the glyph a shaper chose for it, so a many-to-one substitution arrives as
its head plus zero-advance continuations.
Fields§
§chr: char§id: Option<GlyphId>The glyph the shaper chose, where the engine reports one: None at a
continuation, whose ink is already drawn at its head, and throughout a
layout from an engine that reports characters only.
pos: Vec2Baseline position, relative to the row’s origin.
advance: f32The pen advance this glyph carries.
ascent: f32How far the font’s baseline sits below the line’s top edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Glyph
impl RefUnwindSafe for Glyph
impl Send for Glyph
impl Sync for Glyph
impl Unpin for Glyph
impl UnsafeUnpin for Glyph
impl UnwindSafe for Glyph
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