Struct rusttype::VMetrics [] [src]

pub struct VMetrics {
    pub ascent: f32,
    pub descent: f32,
    pub line_gap: f32,
}

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

The highest point that any glyph in the font extends to above the baseline. Typically positive.

descent

The lowest point that any glyph in the font extends to below the baseline. Typically negative.

line_gap

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

Derived Implementations

impl PartialOrd for VMetrics

fn partial_cmp(&self, __arg_0: &VMetrics) -> Option<Ordering>

fn lt(&self, __arg_0: &VMetrics) -> bool

fn le(&self, __arg_0: &VMetrics) -> bool

fn gt(&self, __arg_0: &VMetrics) -> bool

fn ge(&self, __arg_0: &VMetrics) -> bool

impl PartialEq for VMetrics

fn eq(&self, __arg_0: &VMetrics) -> bool

fn ne(&self, __arg_0: &VMetrics) -> bool

impl Debug for VMetrics

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for VMetrics

fn clone(&self) -> VMetrics

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for VMetrics