Modules§
- builder
- measurer
- Character width table consumer, equivalent to the JS version CharWidthTableConsumer. Supports loading font width tables from JSON files, lookup table for character width, string width calculation, and keeps the interface style consistent with JS.
Structs§
Enums§
Traits§
- Font
Metrics - Font width calculation trait, to be implemented and injected by the main project
Functions§
- colors_
for_ background - Dynamically calculates foreground and shadow colors based on background color (equivalent to JS colorsForBackground)
- default_
label_ color - default_
message_ color - get_
text_ width - Calculates the width of text in Verdana 11px (in pixels)
- render_
badge_ svg - Public API: Generate SVG string