What's your preferred method for custom fonts on OLED/TFT displays?

I'm working on a project using an OLED/TFT display and want to display some custom fonts (not just the default library fonts). I've seen a few approaches — using tools like the Adafruit GFX font converter, or libraries like U8g2 which come with a bunch of built-in fonts.

A few questions for the community:

  1. Which library do you prefer for custom fonts — U8g2, Adafruit_GFX, or something else?
  2. Have you ever created your own custom font/bitmap for a display project? Any tips on keeping memory usage low?
  3. Any recommended tools for converting TTF fonts into Arduino-compatible font arrays?

I don't think I could meaningfully answer any of those questions without first knowing the evaluation criteria.

For example, are you primarily optimizing for:

  • smallest flash usage?
  • rendering speed?
  • Unicode support?
  • appearance?
  • ease of workflow?
  • anti-aliased fonts?

Depending on what you're trying to optimize, my answers to all three questions could be different.

Many years ago MikroElectronica has release a software to create custom font array. I remember used it but it's been so long I don't remember how to ;). Maybe you would like to have a look https://www.mikroe.com/glcd-font-creator

U8g2 has the software for converting ttf fonts, might need to download from the github repository, I don’t remember if the IDE library has all the extra files.

As for saving memory, both u8g2 and Adafruit GFT fonts can be created with only the characters that you need.

I have a selection of fonts I created using BMFont

BMFont creates an image of the characters you select, use monospace fonts so that each character contains the same number of bytes.

I keep one or two font sizes on some SPI FRAM, depending on font size you may not need a FRAM, and they load fairly quickly especially if the characters are for a few changing digital values. A frame buffer gives a really smooth animation when values change.

Of course creating your own takes more time and requires a little more thought.

My main goal is to display custom fonts on a small OLED/TFT display while keeping the workflow simple. Unicode support would be a nice bonus because I'm also interested in multilingual text (especially Urdu and English), but ease of use and reasonable memory usage are my top priorities. Rendering speed is less important for my current project.

Based on those priorities, which library or workflow would you recommend?

Thanks for the clarification.

Unfortunately that's outside the area where I can give a well-founded recommendation, so I'll leave it to those with hands-on experience with the different libraries.

Just a thought: since multilingual support is one of your goals, I'd make Unicode support and the font conversion workflow the primary selection criteria before worrying about rendering speed.

Good luck!

The last font I made, I made painstakingly by hand using grid paper. Tron Legacy had just released and I wanted the font in my projects, so I made it. I dont know if the actual font was ever released, but mine exists for all to use.

TRONFONT.C (6.8 KB)

What do you mean by "custom font"? A font you design yourself, or a pre-existing font that is not available in the format needed for the display?