Label text size

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By carbajosa
:warning: Old Version Published before Godot 3 was released.

How do I increase the size of text of the labels? Do I have to use a custom font or I can set it up in the editor? doesn’t seem to have any options for increasing font size. (There is stretch, I think, but it makes the text really blurry)

:bust_in_silhouette: Reply From: kubecz3k

You can only scale fonts in editor. But you can’t change their size on the fly. Proper way to do this is to import new font with Import->Font and set size there.
I’m personally sometimes importing bigger fonts than I need and I’m scaling them down depending on the situation (I’m assuming it’s better to scale down then otherwise). But the effect is not always great so take this with caution - however it’s something that can be helpful when you are experimenting/prototyping

I see… thanks for the clarification. I guess I will have to import fonts then.

carbajosa | 2016-04-21 19:16

To make it more clear:
scale can be used to make the label box and also the text larger (e.g. just increase from 1,1 to 2,2),
so it can be done without importing a font,
stretch did not make any change for me.

xyzzyx | 2016-08-20 09:33

:bust_in_silhouette: Reply From: kubecz3k

Well actually in current version of Godot (2.1) there is support for dynamic fonts. This means you can change actual ttf font size from the inspector. In order to do this you need to expand font property in inspector.

:bust_in_silhouette: Reply From: codevanya

If you are using Godot 3 and a ttf font file, the proper flow of creating a custom font could be:

  1. Create a DynamicFontData file.
  2. Create a DynamicFont file using the DynamicFontData file.
  3. Use the DynamicFont in any Control nodes.

In this process, we can change the font size in DynamicFont properties → Settings. But if you want to use the same font with a different size anywhere else, you have to duplicate this DynamicFont file, adjust its font size and use that. Don’t modify the properties of existing font file.

please share a downloadable project with that working - i’m really struggling to get there

nitrofurano | 2018-08-16 01:02

It seems strange to me that you have to create a new font object for each size you will want to use. I would expect to be able to change the size per label or other UI element.

Senad | 2019-10-18 22:55

Senad: Changing font size on a per-Control basis will be available in Godot 4.0, but not before as it’s a breaking change.

Calinou | 2021-03-16 00:47