TextMesh

Inherits: PrimitiveMesh < Mesh < Resource < Reference < 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

float

curve_step

0.5

float

depth

0.05

Font

font

Align

horizontal_alignment

1

float

pixel_size

0.01

String

text

""

bool

uppercase

false


Enumerations

enum Align:

Align ALIGN_LEFT = 0

Align rows to the left (default).

Align ALIGN_CENTER = 1

Align rows centered.

Align ALIGN_RIGHT = 2

Align rows to the right.


Property Descriptions

float curve_step = 0.5

  • void set_curve_step ( float value )

  • float get_curve_step ( )

Step (in pixels) used to approximate Bézier curves.


float depth = 0.05

  • void set_depth ( float value )

  • 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.


Font font

  • void set_font ( Font value )

  • Font get_font ( )

Font used for the TextMesh's text.


Align horizontal_alignment = 1

  • void set_horizontal_alignment ( Align value )

  • Align get_horizontal_alignment ( )

Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the Align constants.


float pixel_size = 0.01

  • void set_pixel_size ( float value )

  • float get_pixel_size ( )

The size of one pixel's width on the text to scale it in 3D.


String text = ""

The text to generate mesh from.


bool uppercase = false

  • void set_uppercase ( bool value )

  • bool is_uppercase ( )

If true, all the text displays as UPPERCASE.