TextMesh

Hereda: PrimitiveMesh < Mesh < Resource < RefCounted < Object

Genera una PrimitiveMesh a partir del texto.

Descripción

Generate a 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.

Tutoriales

Propiedades

AutowrapMode

autowrap_mode

0

float

curve_step

0.5

float

depth

0.05

Font

font

int

font_size

16

HorizontalAlignment

horizontal_alignment

1

BitField[JustificationFlag]

justification_flags

163

String

language

""

float

line_spacing

0.0

Vector2

offset

Vector2(0, 0)

float

pixel_size

0.01

StructuredTextParser

structured_text_bidi_override

0

Array

structured_text_bidi_override_options

[]

String

text

""

Direction

text_direction

0

bool

uppercase

false

VerticalAlignment

vertical_alignment

1

float

width

500.0


Descripciones de Propiedades

AutowrapMode autowrap_mode = 0 🔗

Si se establece en algo que no sea TextServer.AUTOWRAP_OFF, el texto se ajusta dentro del rectángulo delimitador del nodo. Si cambias el tamaño del nodo, cambiará su altura automáticamente para mostrar todo el texto.


float curve_step = 0.5 🔗

  • void set_curve_step(value: float)

  • float get_curve_step()

Paso (en píxeles) utilizado para aproximar las curvas de Bézier.


float depth = 0.05 🔗

Profundidades de la malla, si se establece en 0.0 solo se genera la superficie frontal, y el diseño UV se cambia para usar la textura completa solo para la cara frontal.


Font font 🔗

  • void set_font(value: Font)

  • Font get_font()

Configuración de la fuente usada para mostrar texto.


int font_size = 16 🔗

  • void set_font_size(value: int)

  • int get_font_size()

Tamaño de fuente del texto de TextMesh.


HorizontalAlignment horizontal_alignment = 1 🔗

Controla la alineación horizontal del texto. Admite izquierda, centro, derecha y relleno, o justificar.


BitField[JustificationFlag] justification_flags = 163 🔗

Reglas de alineación de relleno de línea.


String language = "" 🔗

Código de idioma utilizado para los algoritmos de modelado de texto. Si se deja vacío, se utiliza la configuración regional actual.


float line_spacing = 0.0 🔗

  • void set_line_spacing(value: float)

  • float get_line_spacing()

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.


Vector2 offset = Vector2(0, 0) 🔗

El desplazamiento del dibujo del texto (en píxeles).


float pixel_size = 0.01 🔗

  • void set_pixel_size(value: float)

  • float get_pixel_size()

El tamaño del ancho de un píxel en el texto para escalarlo en 3D.


StructuredTextParser structured_text_bidi_override = 0 🔗

Establece la sobrescritura del algoritmo BiDi para el texto estructurado.


Array structured_text_bidi_override_options = [] 🔗

  • void set_structured_text_bidi_override_options(value: Array)

  • Array get_structured_text_bidi_override_options()

Establece opciones adicionales para la sobrescritura BiDi.


String text = "" 🔗

El texto del que se generará la malla.

Nota: Debido a que es un Resource, no sigue las reglas de Node.auto_translate_mode. Si se desea desactivar la traducción, debe hacerse manualmente con Object.set_message_translation().


Direction text_direction = 0 🔗

Dirección base de escritura del texto.


bool uppercase = false 🔗

  • void set_uppercase(value: bool)

  • bool is_uppercase()

Si es true, todo el texto se muestra como MAYÚSCULAS.


VerticalAlignment vertical_alignment = 1 🔗

Controla la alineación vertical del texto. Admite alineación superior, centrada e inferior.


float width = 500.0 🔗

Ancho del texto (en píxeles), utilizado para la alineación del relleno.