pub fn measure_text(
rasterizer: &TextRasterizer,
text: &str,
style: &TextStyle,
size: PictureSize,
) -> Result<TextBounds, TextRasterError>Expand description
Where text in style lies on a canvas of size (TextBounds), laid
out with rasterizer’s fonts as the engine’s text store lays it out and
placed as a frame places it, without drawing it. Measured at the size a
frame is drawn at, it agrees with that frame to the pixel; text laid out
at another size can break its lines elsewhere.
§Errors
Returns the text host’s refusal: no fonts, or a style out of range.