|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Text elements render strings of glyphs using fonts loaded from @font-face rules. Donner supports per-character positioning, text-anchor, text-decoration, baseline control, and text layout along arbitrary paths via <textPath>. An optional HarfBuzz tier (--config=text-full) adds complex-script shaping.
The DOM base classes for text are SVGTextContentElement and SVGTextPositioningElement.
A font-family name is resolved by FontManager in this order:
Consequences for portability: a file that names a font the viewer lacks (not in the document, not embedded, not installed) renders in Public Sans, so text stays legible but metrics and appearance differ from the authoring machine. A file that names a system font renders correctly on machines that have it and falls back elsewhere; only document @font-face data and the embedded set are guaranteed to travel. Lookups are case-insensitive, and generic CSS families (serif, sans-serif, monospace, ...) resolve through FontManager::setGenericFamilyMapping() before this cascade.