Struct rusttype::VMetrics [−][src]
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
impl Clone for VMetrics
[src]
impl Copy for VMetrics
[src]
impl Debug for VMetrics
[src]
impl Mul<f32> for VMetrics
[src]
type Output = VMetrics
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self
[src]
impl PartialEq<VMetrics> for VMetrics
[src]
impl PartialOrd<VMetrics> for VMetrics
[src]
fn partial_cmp(&self, other: &VMetrics) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl StructuralPartialEq for VMetrics
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,