Skip to main content

measure_text_with_fallback

Function measure_text_with_fallback 

Source
pub fn measure_text_with_fallback(
    text: &str,
    font: &Font,
    emoji_font: &Option<Font>,
    letter_spacing: f32,
) -> f32
Expand description

Measure the width of a text line with emoji-font and glyph-coverage fallback (#3, #8) — mirrors draw_text_with_fallback run-for-run so the width this returns always matches what actually gets painted.