Can a font size be changed?

I can't see anything in the docs about changing font size?

Will I need to find/make a new .fnt file for every font size?

I thought I might at least be able to draw text at double scale for a dirty fix. But that only seems to be doable on images.

Yes, since the fonts are based on low resolution images scaled fonts would be hard to read so you need to create a new font for every size.
If you just need a dirty fix for testing you can draw the font onto an image and then scale or otherwise modify the image before drawing it.

Thanks for the reply.

Are there any good resources for .fnt files?

I would really prefer not to have to make my own, but I need fonts of various sizes.

Maybe I'll end up having to make image files for things like a big "Game Over!" screen, instead of just writing it on the screen.

There is a variety of font provided in the SDK with different sizes available. I am sure you can find something suitable for your game in there :slight_smile:
You can find them in PlaydateSDK/Resources/Fonts

Takuya also recently released a tool to convert computer font:

I'm thinking of fonts of up to 50px tall. But I see why that's impractical.

I'll have a look at that tool though.

Thanks.

Just wanted to share that I added a code example for drawing scaled text here:

2 Likes