pub struct ShapedGlyph {
pub glyph_id: u32,
pub cluster: u32,
pub x_advance: i32,
pub y_advance: i32,
pub x_offset: i32,
pub y_offset: i32,
}Expand description
A single positioned glyph from the shaping engine.
All metric values are in font design units. The caller converts to pixels using the font’s units-per-em and the desired point size.
Fields§
§glyph_id: u32Glyph ID from the font (0 = .notdef).
cluster: u32Byte offset of the start of this glyph’s cluster in the source text.
Multiple glyphs can share the same cluster (ligatures produce one glyph for multiple characters; complex scripts may produce multiple glyphs for one character).
x_advance: i32Horizontal advance in font design units.
y_advance: i32Vertical advance in font design units.
x_offset: i32Horizontal offset from the nominal position.
y_offset: i32Vertical offset from the nominal position.
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 moreSource§impl Debug for ShapedGlyph
impl Debug for ShapedGlyph
Source§impl PartialEq for ShapedGlyph
impl PartialEq for ShapedGlyph
impl Copy for ShapedGlyph
impl Eq for ShapedGlyph
impl StructuralPartialEq for ShapedGlyph
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.