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 Copy for VMetrics[src]
impl Copy for VMetricsimpl Clone for VMetrics[src]
impl Clone for VMetricsfn clone(&self) -> VMetrics[src]
fn clone(&self) -> VMetricsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for VMetrics[src]
impl Debug for VMetricsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for VMetrics[src]
impl PartialEq for VMetricsfn eq(&self, other: &VMetrics) -> bool[src]
fn eq(&self, other: &VMetrics) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &VMetrics) -> bool[src]
fn ne(&self, other: &VMetrics) -> boolThis method tests for !=.
impl PartialOrd for VMetrics[src]
impl PartialOrd for VMetricsfn partial_cmp(&self, other: &VMetrics) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &VMetrics) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &VMetrics) -> bool[src]
fn lt(&self, other: &VMetrics) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &VMetrics) -> bool[src]
fn le(&self, other: &VMetrics) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &VMetrics) -> bool[src]
fn gt(&self, other: &VMetrics) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &VMetrics) -> bool[src]
fn ge(&self, other: &VMetrics) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl From<VMetrics> for VMetrics[src]
impl From<VMetrics> for VMetricsimpl Mul<f32> for VMetrics[src]
impl Mul<f32> for VMetrics