pub struct GlyphMetrics {
pub advance_mm: f32,
pub left_mm: f32,
pub top_mm: f32,
pub width_mm: f32,
pub height_mm: f32,
}Expand description
Font-independent metrics for one print glyph, expressed in millimetres.
Hosts may resolve a resource key to a real font, but layout can use these metrics without
loading fonts or depending on an operating system. advance_mm is the cursor advance;
the bounding box is relative to the glyph origin and is used for collision checks.
Fields§
§advance_mm: f32§left_mm: f32§top_mm: f32§width_mm: f32§height_mm: f32Trait 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
Source§impl Debug for GlyphMetrics
impl Debug for GlyphMetrics
Source§impl<'de> Deserialize<'de> for GlyphMetrics
impl<'de> Deserialize<'de> for GlyphMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GlyphMetrics
impl PartialEq for GlyphMetrics
Source§impl Serialize for GlyphMetrics
impl Serialize for GlyphMetrics
impl StructuralPartialEq 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