pub trait FontMetricsProvider: Debug + Sync {
    // Required method
    fn query_font_metrics(
        &self,
        vertical: bool,
        font: &Font,
        base_size: CSSPixelLength,
        in_media_query: bool,
        retrieve_math_scales: bool
    ) -> FontMetrics;
}
Expand description

A trait used to query font metrics in clients of Stylo. This is used by Device to query font metrics in a way that is specific to the client using Stylo.

Required Methods§

source

fn query_font_metrics( &self, vertical: bool, font: &Font, base_size: CSSPixelLength, in_media_query: bool, retrieve_math_scales: bool ) -> FontMetrics

Query the font metrics for the given font and the given base font size.

Implementors§