Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
A control for displaying text that can contain different font styles, images, and basic formatting.
A control for displaying text that can contain custom fonts, images, and basic formatting. RichTextLabel manages these as an internal tag stack. It also adapts itself to given width/heights.
Note: Assignments to text clear the tag stack and reconstruct it from the property's contents. Any edits made to text will erase previous edits made from other manual sources such as append_text and the
push_* / pop methods.
Note: RichTextLabel doesn't support entangled BBCode tags. For example, instead of using
[b]bold[i]bold italic[/b]italic[/i], use
push_*/pop_* functions won't affect BBCode.
Note: Unlike Label, RichTextLabel doesn't have a property to horizontally align text to the center. Instead, enable bbcode_enabled and surround the text in a
[center] tag as follows:
[center]Example[/center]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the fit_content property.