Trait rich_sdl2_rust::ttf::font::MetricExt
source · pub trait MetricExt {
// Required methods
fn height(&self) -> u32;
fn ascent(&self) -> u32;
fn descent(&self) -> u32;
fn line_skip(&self) -> u32;
}
Expand description
An extension for getters of the font metrics.
Required Methods§
sourcefn ascent(&self) -> u32
fn ascent(&self) -> u32
Returns the maximum ascent, the hight above baseline of the glyph in the font, in pixels.
sourcefn descent(&self) -> u32
fn descent(&self) -> u32
Returns the maximum ascent, the hight below baseline of the glyph in the font, in pixels.
sourcefn line_skip(&self) -> u32
fn line_skip(&self) -> u32
Returns the line skip height of the font, the recommended height of a rendered line of text, in pixels. It is usually larger than MetricExt::height()
.