Material Box

Material Box

WEB Design & Material Images

Godot - How to make text bold in RichTextLabel

Godot

This is an example of how to make text bold 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 bold in the `[b]` tag.

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

# Make the text bold
label.bbcode_enabled = true
label.text = "[b]Bold Text[/b]"

Godot

TitleGodot - How to make text bold in RichTextLabel

CategoryGodot

Created

Update

AuthorYousuke.U