Skip to main content

Fonts

Trait Fonts 

Source
pub trait Fonts {
    // Required method
    fn measure(&self, text: &str, font: &FontSpec) -> TextMetrics;
}
Expand description

Measures text. Implemented by a backend, since only it knows the fonts.

Required Methods§

Source

fn measure(&self, text: &str, font: &FontSpec) -> TextMetrics

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§