Godot:Font
lastmod 2023-04-25created 2021-03-214 edits
Inline example
var font
func _ready():
font = DynamicFont.new()
font.font_data = load("res://whatever.ttf")
font.size = 20
func _draw():
draw_string(font, Vector(0, 0), 'this is some text')
get_string_size
Calculates the size of the area that would be used when drawing text with the given font.