Expand description
Text measurement and rasterization backed by cosmic-text.
The concrete engine is hidden behind TextEngine so M0 can swap cosmic-text
for parley later without touching chart layout code.
Structs§
- Glyph
Image - Rasterized glyph mask ready for backends to blit.
- Text
Engine - Text measurement + shaping facade over cosmic-text.
Enums§
Constants§
- EMBEDDED_
FONT - Embedded DejaVu Sans bytes (shared with PDF/SVG font databases).
- EMBEDDED_
FONT_ OBLIQUE - Embedded DejaVu Sans Oblique for mathtext italic (matplotlib math default).
- FONT_
FAMILY - Family name registered for
EMBEDDED_FONT.
Functions§
- register_
font_ data - Load font bytes into the shared text engine.
- register_
font_ file - Load a font file (
.ttf/.otf/.ttc) into the shared text engine. - registered_
families - Family names of fonts registered via
register_font_file/register_font_data. - registered_
font_ data - Font bytes for PDF / other backends that need to embed registered faces.
- svg_
font_ family_ list - CSS
font-familylist: DejaVu first, then registered faces, then generics.