• Godot HelpGUI
  • [UNSOLVED] How can I scale / resize pixel art fonts for in a pixel art game

Hey there!

I am currently trying to make a 2D pixel art game with a resolution of 160 width x 140 height. But sadly I am not able to make my Dynamic Fonts and or Bitmap Fonts scale and resize to this resolution. Maybe I am doing something wrong here as I am using a RichTextLabel > Apply a new Theme > Give this theme a font> And resize it to fit the size.

I have used multiple plug-ins that allow the making of Bitmap Fonts and I have scoured over the internet to find nothing coming close to my answer.

So I'll try it here as a last resort to figure out how I can make a 5x7 sized font to fit on an actual 88x32 sized dialogue box.

Thanks in advance

Does applying the font override in the RichTextLabel work? For UI in Godot, I generally just set the override directly and I think it's worked okay for pixel fonts, though most of the fonts I've used have a size of 12 pixels at the smallest.

@TwistedTwigleg said: Does applying the font override in the RichTextLabel work? For UI in Godot, I generally just set the override directly and I think it's worked okay for pixel fonts, though most of the fonts I've used have a size of 12 pixels at the smallest.

Yeah I have done the same with my pixel font (called "m5x7.ttf") but it squishes it down terribly

Pixel font size at 12 and also at 16, the original size

It seems very strange to me that this isn't something discussed as much on the internet especially since there are a ton of 2D games / projects of godot, or I might be overestimating here :) .

@rakkarage and @TwistedTwigleg

I did a new test where I scale the RichTextLabel whilst setting the new Rect size + set the font size to be lowered, but this has an effect where the Text can be seen in the scene editor but not in the actual game scene.

Thanks for helping me out on this one btw =)

@rakkarage and @TwistedTwigleg

So I have been searching for what might be going wrong here and I have got a possible explanation:

My screen is 160 x 144 pixels and the dialogue box is even smaller than that 80 x 32 pixels. What happens is that the fonts that I have downloaded are having a standard minimum size of 12. Because most of the fonts that are downloaded are meant for Word documents, PC settings, or games with a WAY higher resolution screen.

I now have found an actual font of a size 3x5 and after a bit more fiddling around I managed to get this result:

I think for now this will work ... for now ... but I might need to make my game window bigger again to allow more detailed fonts to be used.

10 months later