i_slint_core::textlayout

Trait FontMetrics

Source
pub trait FontMetrics<Length: Copy + Sub<Output = Length>> {
    // Required methods
    fn ascent(&self) -> Length;
    fn descent(&self) -> Length;
    fn x_height(&self) -> Length;
    fn cap_height(&self) -> Length;

    // Provided method
    fn height(&self) -> Length { ... }
}

Required Methods§

Source

fn ascent(&self) -> Length

Source

fn descent(&self) -> Length

Source

fn x_height(&self) -> Length

Source

fn cap_height(&self) -> Length

Provided Methods§

Source

fn height(&self) -> Length

Implementors§