123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/TextMesh.xml.
- .. _class_TextMesh:
- TextMesh
- ========
- **Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Generate an :ref:`PrimitiveMesh<class_PrimitiveMesh>` from the text.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Generate an :ref:`PrimitiveMesh<class_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.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`curve_step<class_TextMesh_property_curve_step>` | ``0.5`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`depth<class_TextMesh_property_depth>` | ``0.05`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`Font<class_Font>` | :ref:`font<class_TextMesh_property_font>` | |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`Align<enum_TextMesh_Align>` | :ref:`horizontal_alignment<class_TextMesh_property_horizontal_alignment>` | ``1`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`pixel_size<class_TextMesh_property_pixel_size>` | ``0.01`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`String<class_String>` | :ref:`text<class_TextMesh_property_text>` | ``""`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`uppercase<class_TextMesh_property_uppercase>` | ``false`` |
- +-----------------------------------+---------------------------------------------------------------------------+-----------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_TextMesh_Align:
- .. rst-class:: classref-enumeration
- enum **Align**:
- .. _class_TextMesh_constant_ALIGN_LEFT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Align<enum_TextMesh_Align>` **ALIGN_LEFT** = ``0``
- Align rows to the left (default).
- .. _class_TextMesh_constant_ALIGN_CENTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`Align<enum_TextMesh_Align>` **ALIGN_CENTER** = ``1``
- Align rows centered.
- .. _class_TextMesh_constant_ALIGN_RIGHT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Align<enum_TextMesh_Align>` **ALIGN_RIGHT** = ``2``
- Align rows to the right.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_TextMesh_property_curve_step:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **curve_step** = ``0.5``
- .. rst-class:: classref-property-setget
- - void **set_curve_step** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_curve_step** **(** **)**
- Step (in pixels) used to approximate Bézier curves.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_depth:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **depth** = ``0.05``
- .. rst-class:: classref-property-setget
- - void **set_depth** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_font:
- .. rst-class:: classref-property
- :ref:`Font<class_Font>` **font**
- .. rst-class:: classref-property-setget
- - void **set_font** **(** :ref:`Font<class_Font>` value **)**
- - :ref:`Font<class_Font>` **get_font** **(** **)**
- :ref:`Font<class_Font>` used for the **TextMesh**'s text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_horizontal_alignment:
- .. rst-class:: classref-property
- :ref:`Align<enum_TextMesh_Align>` **horizontal_alignment** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_horizontal_alignment** **(** :ref:`Align<enum_TextMesh_Align>` value **)**
- - :ref:`Align<enum_TextMesh_Align>` **get_horizontal_alignment** **(** **)**
- Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the :ref:`Align<enum_TextMesh_Align>` constants.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_pixel_size:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **pixel_size** = ``0.01``
- .. rst-class:: classref-property-setget
- - void **set_pixel_size** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_pixel_size** **(** **)**
- The size of one pixel's width on the text to scale it in 3D.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_text:
- .. rst-class:: classref-property
- :ref:`String<class_String>` **text** = ``""``
- .. rst-class:: classref-property-setget
- - void **set_text** **(** :ref:`String<class_String>` value **)**
- - :ref:`String<class_String>` **get_text** **(** **)**
- The text to generate mesh from.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextMesh_property_uppercase:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **uppercase** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_uppercase** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **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.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|