FontEdit Font Editor Targets Embedded Systems with LED, LCD or e-Paper Displays

Once I had to use a Chinese TTF font in a project were storage was limited, and I managed to reduce the font size with FontForge open-source editor. It works well as long as your system support standard font formats like TrueType or OpenType, but on embedded systems with even fewer resources, it may not be workable due to the size of the font file, and the footprint of the required libraries.

Instead, you may have to prepare the font in an image editor and convert those into code with a script and that can be cumbersome. So Dominik Kapusta decided to write a little tool to simplify the process. Meet FontEdit.

FontEdit Font Editor Embedded Systems

The program allows you to import fonts, edit glyphs, and potentially add your own custom drawings.  It does have some limitations as it only works with general-purpose fixed-width desktop font and imports font glyphs for characters in the ASCII printable range (32…126 or 0x20…0x7e).  You can still add more glyphs manually outside of this range.

font source code
Click to Enlarge

Once you’re done, you can export the font to an array compatible with C/C++, Arduino (using PROGMEM), or MicroPython/Python (list or bytes objects). Options for the export function include MSB and LSB mode, invert all the bits, tab size, and the font array name.

Once you’ve flashed the board with your program with the embedded font, you can try it out.

Font E-Paper Display
Ubuntu Mono 20pt on an E-Paper display connected to Raspberry Pi – Click to Enlarge

FontEdit is written in C++17 and relies on the Qt framework. It’s been tested on macOS, Ubuntu 18.04/19.10, Windows 10 as well as Raspberry Pi OS / Raspbian. You’ll find the installation packages and the source code on Github, as well as some documentation on Dominik’s blog.

Via embedsys on Twitter.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
3 Comments
oldest
newest
rooted
rooted
4 years ago

Very nice, thanks for the rundown.

David Willmore
David Willmore
4 years ago

I’ve been looking for something like this. I need an 8×8 font for an LED display and all the ‘8×8’ fonts I can find are meant for larger matrixes–so they leave a blank row of pixels at the bottom as a border for the next line. I don’t have a next line, so that’s a waste of pixels. Thanks!

Philipp Blum
Philipp Blum
4 years ago

Thanks. That’s amazing!

Boardcon Rockchip and Allwinner SoM and SBC products