pub fn estimate_text_width(text: &str, style: &TextStyle) -> f64Expand description
Estimates the width of a text string for a given TextStyle.
This uses a heuristic based on average character width ratios for common
proportional fonts. The estimate is char_count * size * 0.6 for normal
weight and char_count * size * 0.65 for bold, which provides reasonable
approximations when the Canvas2D measureText API is not available
(e.g., during testing or server-side pre-layout).