How do I vertically center the text on a Button Node with custom font? In the picture below, you can see the default font has this behavior, but my imported font does not. Am I missing something/doing something wrong? Or can this be achieved an alternate way?
You can create a FontVariation resource. Set the base font to… the base font, and modify the Offset under Baseline to around 0.2, or try modifying Extra Spacing.
Name it something like asana_math_offset.tres, and use it wherever you would normally use the font. If it doesn’t work perfectly in all cases (maybe works on buttons, but looks weird on multiline labels), create another one for that specific case.
I’ve fought with fonts before in Godot and my default is now to find a new font. Because there are all sorts of problems you end up having to deal with when a font isn’t created correctly. If you need that font because you need a math-specific font, there are other math fonts out there. If you aren’t using it because it’s a math-specific font, I recommend finding a new font. Less headaches in the end.
The solution provided by zigg3c does work, but I’m curious what font properties/formats you are looking for when you switch to a different font or just luck of the draw that it centers correctly?
Whatever the issue was, I test for it not having that. Issues I’ve seen include all sorts of weird things - sometimes only showing up when used as 3D fonts. But another typical thing I run into when I have one issue, is that the font isn’t that complete when used for localization.