Material Box

Material Box

WEBデザイン & フリー素材

Godot - RichTextLabelのフォントサイズを変更する

Godot

RichTextLabelでデフォルトのフォントサイズを変更するGDScriptのコード例です。
この方法はLabelノードでは利用できません。


add_theme_font_size_override()で「normal_font_size」プロパティを指定する事でRichTextLabelでのデフォルトのフォントサイズを変更する事が可能です。

var label = RichTextLabel.new()
add_child(label)
label.global_position = Vector2(0, 0)
label.size = Vector2(200,200)
label.text = "Change Font Size"

# RichTextLabelでデフォルトのフォントサイズを変更する
label.add_theme_font_size_override("normal_font_size", 50)

Godot

TitleGodot - RichTextLabelのフォントサイズを変更する

CategoryGodot

Created

Update

AuthorYousuke.U