:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/TextMesh.xml. .. _class_TextMesh: TextMesh ======== **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Generate an :ref:`PrimitiveMesh` from the text. Description ----------- Generate an :ref:`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 ---------- +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`curve_step` | ``0.5`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`depth` | ``0.05`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`Font` | :ref:`font` | | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`Align` | :ref:`horizontal_alignment` | ``1`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`pixel_size` | ``0.01`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`text` | ``""`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`uppercase` | ``false`` | +-----------------------------------+---------------------------------------------------------------------------+-----------+ Enumerations ------------ .. _enum_TextMesh_Align: .. _class_TextMesh_constant_ALIGN_LEFT: .. _class_TextMesh_constant_ALIGN_CENTER: .. _class_TextMesh_constant_ALIGN_RIGHT: enum **Align**: - **ALIGN_LEFT** = **0** --- Align rows to the left (default). - **ALIGN_CENTER** = **1** --- Align rows centered. - **ALIGN_RIGHT** = **2** --- Align rows to the right. Property Descriptions --------------------- .. _class_TextMesh_property_curve_step: - :ref:`float` **curve_step** +-----------+-----------------------+ | *Default* | ``0.5`` | +-----------+-----------------------+ | *Setter* | set_curve_step(value) | +-----------+-----------------------+ | *Getter* | get_curve_step() | +-----------+-----------------------+ Step (in pixels) used to approximate Bézier curves. ---- .. _class_TextMesh_property_depth: - :ref:`float` **depth** +-----------+------------------+ | *Default* | ``0.05`` | +-----------+------------------+ | *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. ---- .. _class_TextMesh_property_font: - :ref:`Font` **font** +----------+-----------------+ | *Setter* | set_font(value) | +----------+-----------------+ | *Getter* | get_font() | +----------+-----------------+ :ref:`Font` used for the ``TextMesh``'s text. ---- .. _class_TextMesh_property_horizontal_alignment: - :ref:`Align` **horizontal_alignment** +-----------+---------------------------------+ | *Default* | ``1`` | +-----------+---------------------------------+ | *Setter* | set_horizontal_alignment(value) | +-----------+---------------------------------+ | *Getter* | get_horizontal_alignment() | +-----------+---------------------------------+ Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the :ref:`Align` constants. ---- .. _class_TextMesh_property_pixel_size: - :ref:`float` **pixel_size** +-----------+-----------------------+ | *Default* | ``0.01`` | +-----------+-----------------------+ | *Setter* | set_pixel_size(value) | +-----------+-----------------------+ | *Getter* | get_pixel_size() | +-----------+-----------------------+ The size of one pixel's width on the text to scale it in 3D. ---- .. _class_TextMesh_property_text: - :ref:`String` **text** +-----------+-----------------+ | *Default* | ``""`` | +-----------+-----------------+ | *Setter* | set_text(value) | +-----------+-----------------+ | *Getter* | get_text() | +-----------+-----------------+ The text to generate mesh from. ---- .. _class_TextMesh_property_uppercase: - :ref:`bool` **uppercase** +-----------+----------------------+ | *Default* | ``false`` | +-----------+----------------------+ | *Setter* | set_uppercase(value) | +-----------+----------------------+ | *Getter* | is_uppercase() | +-----------+----------------------+ If ``true``, all the text displays as UPPERCASE. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`