Welcome to Python-flavored Magnum! Please note that, while already being
rather stable, this functionality is still considered experimental and
some APIs might get changed without preserving full backwards compatibility.
class
RendererCoreText renderer core
Methods
- def add(self, shaper: AbstractShaper, size: float, text: str, features: list[FeatureRange] = []) -> None
- Add a whole string to the currently rendered text
Properties
- alignment: Alignment get set
- Alignment
- cursor: Vector2 get set
- Cursor position
- glyph_cache: AbstractGlyphCache get
- Glyph cache associated with the renderer
- glyph_capacity: int get
- Glyph capacity
- glyph_count: int get
- Total count of rendered glyphs
- is_rendering: bool get
- Whether text rendering is currently in progress
- line_advance: float get set
- Cursor position
- rendering_glyph_count: int get
- Total count of glyphs including current in-progress rendering
- rendering_run_count: int get
- Total count of runs including current in-progress rendering
- run_capacity: int get
- Run capacity
- run_count: int get
- Total count of rendered runs
Method documentation
def magnum. text. RendererCore. add(self,
shaper: AbstractShaper,
size: float,
text: str,
features: list[FeatureRange] = []) -> None
Add a whole string to the currently rendered text
Exceptions | |
---|---|
AssertionError | If shaper font isn’t present in
glyph_cache |
Property documentation
magnum. text. RendererCore. alignment: Alignment get set
Alignment
Exceptions | |
---|---|
AssertionError | If setting this property while rendering is in progress |
magnum. text. RendererCore. cursor: Vector2 get set
Cursor position
Exceptions | |
---|---|
AssertionError | If setting this property while rendering is in progress |
magnum. text. RendererCore. line_advance: float get set
Cursor position
Exceptions | |
---|---|
AssertionError | If setting this property while rendering is in progress |