summaryrefslogtreecommitdiff
path: root/doc/classes/FontVariation.xml
diff options
context:
space:
mode:
authorCorentinBrulé <corentin.brule@gmail.com>2023-02-06 14:07:35 +0100
committercorentin brulé <corentin.brule@gmail.com>2023-02-06 16:22:50 +0100
commit57d495f43bb0b4e743cd4c2878a0f75f5931ae72 (patch)
treebb2b619578a8b53f943da5601fbfce87bab03128 /doc/classes/FontVariation.xml
parent47c3e3b781a0aacc10c589a701a23aaac198663f (diff)
Complete FontFile ref and update example
I complete the ref items according to [TextServer ref](https://docs.godotengine.org/en/latest/classes/class_textserver.html) and update example with new properties path
Diffstat (limited to 'doc/classes/FontVariation.xml')
-rw-r--r--doc/classes/FontVariation.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
index e0fad126b9..5bc2606adb 100644
--- a/doc/classes/FontVariation.xml
+++ b/doc/classes/FontVariation.xml
@@ -10,16 +10,16 @@
[gdscript]
var fv = FontVariation.new()
fv.set_base_font(load("res://BarlowCondensed-Regular.ttf"))
- fv.set_variation_embolden(1.2);
- $"Label".set("custom_fonts/font", fv)
- $"Label".set("custom_fonts/font_size", 64)
+ fv.set_variation_embolden(1.2)
+ $Label.add_theme_font_override("font", fv)
+ $Label.add_theme_font_size_override("font_size", 64)
[/gdscript]
[csharp]
var fv = new FontVariation();
fv.SetBaseFont(ResourceLoader.Load&lt;FontFile&gt;("res://BarlowCondensed-Regular.ttf"));
fv.SetVariationEmbolden(1.2);
- GetNode("Label").Set("custom_fonts/font", fv);
- GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ GetNode("Label").AddThemeFontOverride("font", fv);
+ GetNode("Label").AddThemeFontSizeOverride("font_size", 64);
[/csharp]
[/codeblocks]
</description>