Material Box

Material Box

WEB Design & Material Images

Godot - How to make text italic in RichTextLabel

Godot

This is an example of how to make text italic in a RichTextLabel node using BBCode in GDScript.
This method is not available for Label nodes.


Enables the `bbcode_enabled` property.
Wraps the text to italic in the `[i]` tag.

var label = RichTextLabel.new()
add_child(label)
label.global_position = Vector2(0, 0)
label.size = Vector2(200,200)

# Make the text italic
label.bbcode_enabled = true
label.text = "[i]Italic Text[/i]"

Godot

TitleGodot - How to make text italic in RichTextLabel

CategoryGodot

Created

Update

AuthorYousuke.U