#[non_exhaustive]pub struct FontMetrics {
pub units_per_em: u16,
pub ascent: i16,
pub descent: i16,
pub line_gap: i16,
pub cap_height: i16,
pub x_height: i16,
pub glyphs: u16,
}Expand description
the vertical metrics of a font in its own units (Document::font_metrics)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.units_per_em: u16§ascent: i16above the baseline (positive)
descent: i16below the baseline (negative)
line_gap: i16§cap_height: i16§x_height: i16§glyphs: u16how many glyphs the font has
Trait Implementations§
Source§impl Clone for FontMetrics
impl Clone for FontMetrics
impl Copy for FontMetrics
Source§impl Debug for FontMetrics
impl Debug for FontMetrics
impl Eq for FontMetrics
Source§impl PartialEq for FontMetrics
impl PartialEq for FontMetrics
impl StructuralPartialEq for FontMetrics
Auto Trait Implementations§
impl Forget for FontMetrics
impl Freeze for FontMetrics
impl Move for FontMetrics
impl RefUnwindSafe for FontMetrics
impl Send for FontMetrics
impl Sync for FontMetrics
impl Unpin for FontMetrics
impl UnsafeUnpin for FontMetrics
impl UnwindSafe for FontMetrics
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