diff options
Diffstat (limited to 'doc/classes/DynamicFont.xml')
-rw-r--r-- | doc/classes/DynamicFont.xml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 500da1b30f..5fdc1ebb75 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -5,11 +5,15 @@ </brief_description> <description> DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. + [codeblock] + var dynamic_font = DynamicFont.new() + dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") + dynamic_font.size = 64 + $"Label".set("custom_fonts/font", dynamic_font) + [/codeblock] </description> <tutorials> </tutorials> - <demos> - </demos> <methods> <method name="add_fallback"> <return type="void"> |