pub struct GlyphMetrics {
pub char_code: u32,
pub atlas_x: u16,
pub atlas_y: u16,
pub atlas_w: u16,
pub atlas_h: u16,
pub advance_px: f32,
pub bearing_x: f32,
pub bearing_y: f32,
}Expand description
Per-glyph metrics stored in the compiled payload.
Fields§
§char_code: u32The Unicode code point this glyph renders.
atlas_x: u16Glyph’s left edge in the atlas, in pixels.
atlas_y: u16Glyph’s top edge in the atlas, in pixels.
atlas_w: u16Glyph width in the atlas, in pixels.
atlas_h: u16Glyph height in the atlas, in pixels.
advance_px: f32Pen advance after this glyph, in pixels.
bearing_x: f32Horizontal offset from the pen to the glyph’s left edge.
bearing_y: f32Vertical offset from the baseline to the glyph’s top edge.
Trait Implementations§
Source§impl Clone for GlyphMetrics
impl Clone for GlyphMetrics
Source§fn clone(&self) -> GlyphMetrics
fn clone(&self) -> GlyphMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GlyphMetrics
Auto Trait Implementations§
impl Freeze for GlyphMetrics
impl RefUnwindSafe for GlyphMetrics
impl Send for GlyphMetrics
impl Sync for GlyphMetrics
impl Unpin for GlyphMetrics
impl UnsafeUnpin for GlyphMetrics
impl UnwindSafe for GlyphMetrics
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