Skip to main content

TextMeasure

Trait TextMeasure 

Source
pub trait TextMeasure {
    // Required method
    fn width_mm(&self, text: &str, cap: f64) -> f64;
}
Expand description

How wide a run of text is on paper: the renderer’s font metrics, so the layout and the drawing agree.

Required Methods§

Source

fn width_mm(&self, text: &str, cap: f64) -> f64

The width in millimetres of text at cap height cap.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§