MSDF text rendering for Draw2D.
Handles font loading, glyph layout, and text measurement using the shared
TextRenderer and MSDF atlas infrastructure.
Module Contents
Classes
Draw2DTextMixin
|
Mixin providing MSDF text rendering and measurement for Draw2D. |
API
-
simvx.graphics.draw2d_text.log[source]
‘getLogger(…)’
-
class simvx.graphics.draw2d_text.Draw2DTextMixin[source]
Mixin providing MSDF text rendering and measurement for Draw2D.
-
classmethod set_font(path: str | None = None, size: int = 48) → None[source]
Load an MSDF font atlas via the shared TextRenderer.
-
classmethod draw_text(text, pos, scale=1, colour=None)[source]
-
classmethod text_width(text, scale=1)[source]
-
classmethod draw_text_coloured(text, x, y, scale=1, colour=None)[source]
Draw text with colour (float 0-1 tuple) in one call.