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§

source

fn height(&self) -> u32

Returns the maximum height of the glyph in the font, in pixels.

source

fn ascent(&self) -> u32

Returns the maximum ascent, the hight above baseline of the glyph in the font, in pixels.

source

fn descent(&self) -> u32

Returns the maximum ascent, the hight below baseline of the glyph in the font, in pixels.

source

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().

Implementors§

source§

impl MetricExt for Font<'_>