Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Lejardo |
I tried everyway I’v thought, and searched a long time here but without gook luck.
I just wanna change the Button, or Label, displaying font to a TTF, by scripts.
I tried these ways:
set("custom_fonts/font", load("res://FONT/mainmenu_button.ttf"))
add_font_override("custom_fonts/font",load("res://FONT/mainmenu_button.ttf"))
add_font_override("font",load("res://FONT/mainmenu_button.ttf"))
add_color_override("font_color", Color(1,0,0,1))
set("custom_fonts/font", load("res://FONT/mainmenu_button.ttf"))
set("custom_fonts/font", DynamicFont)
set("DynamicFontdata",load("res://FONT/mainmenu_button.ttf"))
set("font_data",load("res://FONT/mainmenu_button.ttf"))
The ttf font I wanna use is “res://FONT/mainmenu_button.ttf”.
I just can’t make it work.
Help me, plz.