Expand description
Text measurement interface and allocation-free text helpers.
The core needs text widths for axis sizing and label layout but must not depend
on a font library. Hosts pass a TextMeasurer (implemented on top of
ferrochart-text by the backends). ASCII text, which covers almost every axis
label, is measured by summing a per-font advance table: no callback per label,
no cache, no allocation.
Structs§
- Stack
Str - A fixed-capacity string on the stack, for formatting labels without allocating.
Writes beyond the capacity fail with
fmt::Error.
Traits§
- Text
Measurer - Measures text for layout.
Functions§
- text_
width - Width of
textin physical pixels: the fast path for ASCII (and ASCII with subscript digits, when the measurer has their table),TextMeasurer::measureotherwise.