Skip to main content

estimate_text_size

Function estimate_text_size 

Source
pub fn estimate_text_size(
    text: &str,
    font_name: &str,
    font_size: f64,
) -> (f64, f64)
Expand description

Estimates the (width, height) in points of a single-line text span for a given font_name and font_size, matching estimate_textspan_size in lib/common/textspan.c.