pub struct ShapedGlyph {
pub glyph_id: u16,
pub cluster: u32,
pub x_advance: i32,
pub y_advance: i32,
pub x_offset: i32,
pub y_offset: i32,
}Expand description
A single glyph produced by OpenType shaping.
Fields§
§glyph_id: u16Real glyph ID from GSUB (not a Unicode codepoint).
cluster: u32Index of the first character in the input text that maps to this glyph. Multiple chars may map to one glyph (ligatures), or one char may produce multiple glyphs (decomposition).
x_advance: i32Horizontal advance in font units.
y_advance: i32Vertical advance in font units (usually 0 for horizontal text).
x_offset: i32Horizontal offset from GPOS (kerning, mark positioning).
y_offset: i32Vertical offset from GPOS.
Trait Implementations§
Source§impl Clone for ShapedGlyph
impl Clone for ShapedGlyph
Source§fn clone(&self) -> ShapedGlyph
fn clone(&self) -> ShapedGlyph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShapedGlyph
impl RefUnwindSafe for ShapedGlyph
impl Send for ShapedGlyph
impl Sync for ShapedGlyph
impl Unpin for ShapedGlyph
impl UnsafeUnpin for ShapedGlyph
impl UnwindSafe for ShapedGlyph
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