Class TextMesh
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class TextMesh : PrimitiveMesh, IDisposable
- Inheritance
-
TextMesh
- Implements
- Inherited Members
Constructors
TextMesh()
public TextMesh()
Properties
AutowrapMode
If set to something other than Off, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see TextServer.AutowrapMode.
public TextServer.AutowrapMode AutowrapMode { get; set; }
Property Value
CurveStep
Step (in pixels) used to approximate Bézier curves.
public float CurveStep { get; set; }
Property Value
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.
public float Depth { get; set; }
Property Value
Font
Font configuration used to display text.
public Font Font { get; set; }
Property Value
FontSize
Font size of the TextMesh's text.
public int FontSize { get; set; }
Property Value
HorizontalAlignment
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the HorizontalAlignment constants.
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
JustificationFlags
Line fill alignment rules. For more info see TextServer.JustificationFlag.
public TextServer.JustificationFlag JustificationFlags { get; set; }
Property Value
Language
Language code used for text shaping algorithms, if left empty current locale is used instead.
public string Language { get; set; }
Property Value
LineSpacing
Vertical space between lines in multiline TextMesh.
public float LineSpacing { get; set; }
Property Value
Offset
The text drawing offset (in pixels).
public Vector2 Offset { get; set; }
Property Value
PixelSize
The size of one pixel's width on the text to scale it in 3D.
public float PixelSize { get; set; }
Property Value
StructuredTextBidiOverride
Set BiDi algorithm override for the structured text.
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }
Property Value
StructuredTextBidiOverrideOptions
Set additional options for BiDi override.
public Array StructuredTextBidiOverrideOptions { get; set; }
Property Value
Text
The text to generate mesh from.
public string Text { get; set; }
Property Value
TextDirection
Base text writing direction.
public TextServer.Direction TextDirection { get; set; }
Property Value
Uppercase
If true
, all the text displays as UPPERCASE.
public bool Uppercase { get; set; }
Property Value
VerticalAlignment
Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the VerticalAlignment constants.
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Width
Text width (in pixels), used for fill alignment.
public float Width { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.