TextMesh¶
Inherits: PrimitiveMesh < Mesh < Resource < RefCounted < Object
Generate an PrimitiveMesh from the text.
Description¶
Generate an PrimitiveMesh from the text.
TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported.
The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
BitField<JustificationFlag> |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Descriptions¶
AutowrapMode autowrap_mode = 0
void set_autowrap_mode ( AutowrapMode value )
AutowrapMode get_autowrap_mode ( )
If set to something other than TextServer.AUTOWRAP_OFF, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see AutowrapMode.
float curve_step = 0.5
Step (in pixels) used to approximate Bézier curves.
float depth = 0.05
Depths of the mesh, if set to 0.0
only front surface, is generated, and UV layout is changed to use full texture for the front face only.
Font font
Font configuration used to display text.
int font_size = 16
Font size of the TextMesh's text.
HorizontalAlignment horizontal_alignment = 1
void set_horizontal_alignment ( HorizontalAlignment value )
HorizontalAlignment get_horizontal_alignment ( )
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the HorizontalAlignment constants.
BitField<JustificationFlag> justification_flags = 163
void set_justification_flags ( BitField<JustificationFlag> value )