Skip to main content

RendererTextMeasuringProvider

Trait RendererTextMeasuringProvider 

Source
pub trait RendererTextMeasuringProvider<TextConfig> {
    // Required method
    fn provide_measurer(&mut self) -> Box<TextMeasurer<'_, TextConfig>>;
}
Expand description

Implemented by renderers that can measure text for layout.

A renderer provides a closure that maps (text, config) into measured Dimensions. Layout systems call this closure while computing text nodes.

Required Methods§

Source

fn provide_measurer(&mut self) -> Box<TextMeasurer<'_, TextConfig>>

Returns a measuring function used by layout code.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§