I’m using a label to display text in a low resolution pixel font, so the height of an actual text line is only 16 pixels. However, Godot won’t let me make the label itself smaller than 23px in height, even if I try radical things like setting the font_size to 1.
The issue with that is that I want the lable to react when pointed at with a mouse using _on_mouse_entered(), but due to this weird limitation there are huge (relative to the resolution) margins above/below the text where that is also triggered.
Is there any setting default property I need to change that’s blocking this?
I’ve found kind of a workaround … when I set the size in code EVERY CYCLE then I can make the mouse react to the smaller size, but if I do it just once, it immediately reverts back to 23px.
What is your font size? As @sancho2 mentioned, if you change your font size you should be able to change the size of the label. Font size limits how the label can be resized.
If you want the trigger for mouse input to be smaller than the Label’s size without changing the font size, then maybe you can create a child Control with smaller size that will be your trigger?
You can test the label out in a fresh project. The label will reduce in size relative to custom font size.
Maybe your label is a child of a container? Maybe you have some code that is fouling it?
Otherwise I can see no situation where the label will revert to another size.