#[repr(C)]pub struct FontMetrics {
pub ascent: Coord,
pub descent: Coord,
pub x_height: Coord,
pub cap_height: Coord,
}
Expand description
A structure to hold metrics of a font for a specified pixel size.
Fields§
§ascent: Coord
The distance between the baseline and the top of the tallest glyph in the font.
descent: Coord
The distance between the baseline and the bottom of the tallest glyph in the font. This is usually negative.
x_height: Coord
The distance between the baseline and the horizontal midpoint of the tallest glyph in the font, or zero if not specified by the font.
cap_height: Coord
The distance between the baseline and the top of a regular upper-case glyph in the font, or zero if not specified by the font.
Trait Implementations§
Source§impl Clone for FontMetrics
impl Clone for FontMetrics
Source§fn clone(&self) -> FontMetrics
fn clone(&self) -> FontMetrics
Returns a copy 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 FontMetrics
impl Debug for FontMetrics
Source§impl Default for FontMetrics
impl Default for FontMetrics
Source§fn default() -> FontMetrics
fn default() -> FontMetrics
Returns the “default value” for a type. Read more
Source§impl PartialEq for FontMetrics
impl PartialEq for FontMetrics
impl StructuralPartialEq for FontMetrics
Auto Trait Implementations§
impl Freeze for FontMetrics
impl RefUnwindSafe for FontMetrics
impl Send for FontMetrics
impl Sync for FontMetrics
impl Unpin 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