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.
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Descriptions¶
float curve_step
Default |
|
Setter |
set_curve_step(value) |
Getter |
get_curve_step() |
Step (in pixels) used to approximate Bézier curves.
float depth
Default |
|
Setter |
set_depth(value) |
Getter |
get_depth() |
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
Setter |
set_font(value) |
Getter |
get_font() |
Font configuration used to display text.
int font_size
Default |
|
Setter |
set_font_size(value) |
Getter |
get_font_size() |
Font size of the TextMesh
's text.
HorizontalAlignment horizontal_alignment
Default |
|
Setter |
set_horizontal_alignment(value) |
Getter |
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.
String language
Default |
|
Setter |
set_language(value) |
Getter |
get_language() |
Language code used for text shaping algorithms, if left empty current locale is used instead.
float pixel_size
Default |
|
Setter |
set_pixel_size(value) |
Getter |
get_pixel_size() |
The size of one pixel's width on the text to scale it in 3D.
StructuredTextParser structured_text_bidi_override
Default |
|
Setter |
set_structured_text_bidi_override(value) |
Getter |
get_structured_text_bidi_override() |
Set BiDi algorithm override for the structured text.
Array structured_text_bidi_override_options
Default |
|
Setter |
set_structured_text_bidi_override_options(value) |
Getter |
get_structured_text_bidi_override_options() |
Set additional options for BiDi override.
String text
Default |
|
Setter |
set_text(value) |
Getter |
get_text() |
The text to generate mesh from.
Direction text_direction
Default |
|
Setter |
set_text_direction(value) |
Getter |
get_text_direction() |
Base text writing direction.
bool uppercase
Default |
|
Setter |
set_uppercase(value) |
Getter |
is_uppercase() |
If true
, all the text displays as UPPERCASE.
float width
Default |
|
Setter |
set_width(value) |
Getter |
get_width() |
Text width (in pixels), used for fill alignment.