Skip to main content

measure_text_width

Function measure_text_width 

Source
pub fn measure_text_width(
    text: &SharedString,
    font_size: Pixels,
    window: &mut Window,
) -> f32
Expand description

Returns the rendered width of text at font_size using the window’s current text style. Used for layout calculations that need to reserve space for labels before the scale ranges are fixed.