How to automatically resize a text in Label node in Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By enriicoo

I am having trouble with resizing a font inside a button in Godot. The idea is that, inside the button, we have 1:1:1 rect/label/rect proportion with text inside label as big as it can vertically be. I tried to synchronize the size of the Label rect with the font size, with the Resized() property, with no success yet.

The node tree is Button>VBoxContainer>(TextureRect, Label, TextureRect).


After (no success):

what is your actual code

exuin | 2023-02-25 09:45