How you deal with many fonts?

As you can see there only 3 fonts but with different sizes. Little bit worried about performance and size of game.

I can scale font, but here issues:

  1. It’s difficult to scale precisely to target size
  2. Not sure how defold+druid handle components.
-a----        23.03.2026     22:10            231 germania_one_32.font
-a----        23.03.2026     22:10            231 germania_one_40.font
-a----        23.03.2026     22:10            231 germania_one_48.font
-a----        23.03.2026     22:10            231 germania_one_64.font
-a----        23.03.2026     22:10            231 germania_one_96.font
-a----        23.03.2026     22:10            238 sofia_40.font
-a----        23.03.2026     22:10            238 sofia_48.font
-a----        23.03.2026     22:10            238 sofia_54.font
-a----        23.03.2026     22:10            238 sofia_64.font
-a----        23.03.2026     22:10            238 sofia_72.font
-a----        23.03.2026     22:10            226 sofia_bold_40.font
-a----        23.03.2026     22:10            226 sofia_bold_48.font
-a----        23.03.2026     22:10            226 sofia_bold_58.font
-a----        23.03.2026     22:10            226 sofia_bold_64.font
1 Like

Well, you will not need multiple sizes of your font if you use distance field fonts. The idea with distance fields fonts is that they can be scaled to fit. The font file must use a decent size on the font but can then be scaled up and down as you need.

You can combine this with runtime generated fonts to also generate the glyphs at runtime from a ttf font.

5 Likes