Function with_layout_renderer
pub fn with_layout_renderer<R>(
text_scale: f32,
f: impl FnOnce(&mut TextRenderer) -> R,
) -> RExpand description
Run f with a layout-only renderer at text_scale, for widgets that
must measure in apply_layout, which is handed no renderer. Building one
loads every installed font (tens of milliseconds) and layout runs every
frame an animation is live, so renderers are pooled per thread; a nested
call takes its own from the pool rather than borrowing the outer one.