simvx.core.text.font¶
Font loading via freetype-py with proper glyph metrics and outline access.
Module Contents¶
Classes¶
Metrics for a single glyph. |
|
TrueType font with freetype-py for outlines and metrics. |
Data¶
API¶
- simvx.core.text.font.log¶
‘getLogger(…)’
- class simvx.core.text.font.GlyphMetrics[source]¶
Metrics for a single glyph.
- char: str¶
None
- advance_x: float¶
None
- bearing_x: float¶
None
- bearing_y: float¶
None
- width: int¶
None
- height: int¶
None
- contours: list[list[tuple[float, float, bool]]] | None¶
None
- class simvx.core.text.font.Font(path: str | pathlib.Path, size: int = 64, face_index: int = 0)[source]¶
TrueType font with freetype-py for outlines and metrics.
Initialization
- get_glyph(char: str) simvx.core.text.font.GlyphMetrics[source]¶
Get glyph metrics and outline contours.
- get_kerning(left: str, right: str) float[source]¶
Get kerning adjustment between two characters in pixels.