pub struct VMetrics {
pub ascent: f32,
pub descent: f32,
pub line_gap: f32,
}
Expand description
The “vertical metrics” of a font at a particular scale. This is useful for calculating the amount of vertical space to give a line of text, and for computing the vertical offset between successive lines.
Fields§
§ascent: f32
The highest point that any glyph in the font extends to above the baseline. Typically positive.
descent: f32
The lowest point that any glyph in the font extends to below the baseline. Typically negative.
line_gap: f32
The gap to leave between the descent of one line and the ascent of the next. This is of course only a guideline given by the font’s designers.
Trait Implementations§
source§impl PartialEq for VMetrics
impl PartialEq for VMetrics
source§impl PartialOrd for VMetrics
impl PartialOrd for VMetrics
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for VMetrics
impl StructuralPartialEq for VMetrics
Auto Trait Implementations§
impl RefUnwindSafe for VMetrics
impl Send for VMetrics
impl Sync for VMetrics
impl Unpin for VMetrics
impl UnwindSafe for VMetrics
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