simvx.graphics.text_utils¶
Text utility helpers extracted from Engine: font finding and text rasterization.
Module Contents¶
Classes¶
GPU-backed text texture for use on 3D objects. |
Functions¶
Find a usable system font path via the unified font finder. |
|
Create a TextTexture backed by GPU resources from the given context. |
Data¶
API¶
- simvx.graphics.text_utils.__all__¶
[‘TextTexture’, ‘create_text_texture’, ‘find_font_path’, ‘rasterize_text’]
- simvx.graphics.text_utils.find_font_path() str[source]¶
Find a usable system font path via the unified font finder.
- class simvx.graphics.text_utils.TextTexture(ctx: simvx.graphics.gpu.context.GPUContext, register_texture: Any, texture_descriptor_set: Any, default_sampler: Any, font: str | None = None, size: int = 32, width: int = 256, height: int = 64)[source]¶
GPU-backed text texture for use on 3D objects.
Properties
.textand.colourtrigger re-rasterization and GPU upload when changed.Initialization
- simvx.graphics.text_utils.create_text_texture(ctx: simvx.graphics.gpu.context.GPUContext, register_texture: Any, texture_descriptor_set: Any, default_sampler: Any, font: str | None = None, size: int = 32, width: int = 256, height: int = 64) simvx.graphics.text_utils.TextTexture[source]¶
Create a TextTexture backed by GPU resources from the given context.