Text Size
Set via .scale
or .world_scale
:
text_entity = Text('hello', world_scale=2)
Change default text size globally:
Text.size = 0.05 # double default size (default: 0.025)
For non-uniformly scaled Button:
button = Button(scale=(0.2, 0.1), text='Start')
button.text_entity.world_scale = 2
Text Alignment
Modify .origin
to change alignment:
Text('Hello\nWorld!', origin=(-0.5, 0.5)) # top-left (default)
Text('Hello\nWorld!', origin=(0, 0)) # center
Text Colors
Color entire text:
t = Text('This is some text', color=color.blue)
Use tags to color parts:
t = Text('This is some <pink>colored text. <default>Reset.', color=color.blue)