Expand description
Fonts for editable SVG text: MapLibre font names resolved to font files
(user folders, a local cache, then Google Fonts for open fonts), the
characters each font draws, and @font-face rules embedding them
(subset to those characters, or whole).
MapLibre styles name fonts (“Open Sans Bold”) but serve only SDF glyph bitmaps, so true outlines need the font files themselves. Fonts that cannot be found stay referenced by name: the text remains editable and uses whatever the viewer has installed.
Structs§
- Font
Face - One font of the document: what CSS calls it and, when found, its file.
- SvgFonts
- The fonts of an SVG document: faces, the faces of each font stack, and the characters each face draws.
- SvgOptions
- SVG output options.
Enums§
Functions§
- parse_
font_ name - A MapLibre font name split into family, CSS weight and italic, e.g. “Montserrat SemiBold Italic” -> (“Montserrat”, 600, true).
- resolve
- Resolve the fonts of the given font stacks.
- subset_
for_ fixture - A subset of
datawith the characters ofchars(test fixtures).