+1 vote

This is either trivially easy or not possible, and I can't tell which after tracking down about a dozen Q&A posts here, GitHub issues, or other random google sources. (Sorry for the tone of exasperation...)

If it matters, I'm working on a Button. One answer I saw was to change rectscale. This DOES change the font size in the editor, but does NOT change font size in my running game. I can tell by print(mybutton.rect_scale) that my change "sticks". Other threads offer other solutions but these all seem to involve custom fonts even when the question was "without loading custom fonts".

I realize I may want a custom font someday. But I'm just prototyping ideas now.

If the answer really is "not possible", I would greatly appreciate a tip on where to find one without entering the malware storm that threatens when I google "free font".

asked Apr 18, 2018 in Engine by Charlie (91 points)

2 Answers

0 votes

In answer to the second part of your question, I use Google Fonts - free and no malware


answered Apr 19, 2018 by SleepyTom (136 points)
+3 votes

It is not currently possible to change the size of a font without importing a custom font. However, it is easy to import custom fonts by creating one or several DynamicFont resources which can load TTF or OTF font files into them – the only prerequisite is to drop a font file into the project folder.

Many websites distribute open source fonts that can be freely used in personal and commercial projects, such as Google Fonts or Font Library (which offers hundreds of fonts that are not provided by Google Fonts).

For information, the default fonts used in Godot are:

  • in Godot 3.0: Noto Sans in the editor, Droid Sans in projects, Hack in the script editor,
  • in Godot 2.1: Droid Sans in the editor and projects, Source Code Pro in the script editor.
answered Apr 19, 2018 by Calinou (6,560 points)

Thanks! I have my answer now!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.