My script:
extends RichTextLabel
func _ready():
self.set_use_bbcode(true)
self.set_bbcode("test [b]test[/b] [i]{test}[/i]")
The output:
test test {test}
Thank you.
My script:
extends RichTextLabel
func _ready():
self.set_use_bbcode(true)
self.set_bbcode("test [b]test[/b] [i]{test}[/i]")
The output:
test test {test}
Thank you.
Does your RichTextLabel have either a theme with bold and italic fonts setup, or does it have bold and italic fonts assigned in the inspector?
I don't have either a theme nor fonts assigned in the inspector. I assume this is the problem.
Where would I get bold and italic font files?
Thank you.
Well, it depends on the font. Some fonts don't have a bold/italic variant, while others have both.
If you are using windows, you can find the fonts installed on your computer at "C:\Windows\Fonts". Most of the fonts that come with windows have bold and italic variants, though I'm not sure if you can use them on published games...
If you are on Linux or Mac OS, then I would try googling where fonts are installed.
You could also download a font and it's bold and italic variants, if the font has them. I would google something like "free fonts" or "fonts for games" and look at the various fonts, just make sure the license allows you using it in your game :smile: (if you plan on publishing it)