Godot - RichTextLabelのテキストの行間を変更する
RichTextLabelでデフォルトのテキストの行間を変更するGDScriptのコード例です。
add_theme_constant_override()
で「line_separation」プロパティを指定する事でRichTextLabelでのデフォルトのテキストの行間を変更する事が可能です。
Labelノードの場合は「line_spacing」にて行間を設定します。
var label = RichTextLabel.new()
add_child(label)
label.global_position = Vector2(0, 0)
label.size = Vector2(200,200)
label.text = "Line\r\nSeparation"
# RichTextLabelでデフォルトのテキストの色を変更する
label.add_theme_constant_override("line_separation", 50)
![Godot](/images/godot/image.png)