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§
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".