A control for displaying plain text.
A control for displaying plain text. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other rich text formatting. For that, use RichTextLabel instead.
Note: A single Label node is not designed to display huge amounts of text. To display large amounts of text in a single node, consider using RichTextLabel instead as it supports features like an integrated scroll bar and threading. RichTextLabel generally performs better when displaying large amounts of text (several pages or more).
If set to something other than TextServer.AUTOWRAP_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.
Note: Labels with autowrapping enabled must have a custom maximum width configured to work correctly, either through the Label's own Control.custom_maximum_size or as a result of a propagated maximum size from a parent Control with Control.propagate_maximum_size enabled.
Autowrap space trimming flags. See TextServer.BREAK_TRIM_START_EDGE_SPACES and TextServer.BREAK_TRIM_END_EDGE_SPACES for more info.
If true, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
Controls the text's horizontal alignment. Supports left, center, right, and fill (also known as justify).
A LabelSettings resource that can be shared between multiple Label nodes. Takes priority over theme properties.
Language code used for line-breaking and text shaping algorithms. If left empty, the current locale is used instead.
The number of the lines ignored and not displayed from the start of the text value.
String used as a paragraph separator. Each paragraph is processed independently, in its own BiDi context.
Controls the text's vertical alignment. Supports top, center, bottom, and fill.
The number of characters to display. If set to -1, all characters are displayed. This can be useful when animating the text appearing in a dialog box.
Note: Setting this property updates visible_ratio accordingly.
Note: Characters are counted as Unicode codepoints. A single visible grapheme may contain multiple codepoints (e.g. certain emoji use three codepoints). A single codepoint may contain two UTF-16 characters, which are used in C# strings.
The clipping behavior when visible_characters or visible_ratio is set.
The fraction of characters to display, relative to the total number of characters (see get_total_character_count()). If set to 1.0, all characters are displayed. If set to 0.5, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box.
Note: Setting this property updates visible_characters accordingly.
Returns the bounding rectangle of the character at position pos in the label's local coordinate system. If the character is a non-visual character or pos is outside the valid range, an empty Rect2 is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.
Returns the height of the line line.
If line is set to -1, returns the biggest line height.
If there are no lines, returns font size in pixels.
Returns the number of lines shown. Useful if the Label's height cannot currently display all lines.