Skip to main content

measure_text

Function measure_text 

Source
pub fn measure_text(text: &str, font: &FontMetrics) -> Size
Expand description

Compute the bounding box of text without wrapping.

Each \n starts a new measured line, but lines are never reflowed to fit a width. Width is the maximum measured line width; height is line_count * line_height_pt().