Converting fonts from TrueType to Adafruit GFX
Many Arduino projects and ready-built devices come with a display. And the Adafruit GFX display driver is used by many of them to display variable-width fonts. Some fonts usually are included with the driver, and then there's a complicated procedure for adding your own fonts. It involves compiling tools and a trail-and-error process for figuring out how big the font will be on your display as well as relative to the other fonts.
But now you can skip all that and convert the fonts your Arduino project needs with ease. No need to compile tools, no need to find out how big a font will be by trial and error. Simply select a FreeFont or upload any TrueType font, select a size, download the include file and you're ready to use the font in your project.
This is the github repository. The tool itself is a server thing that works with your webbrowser. It is available for your use here, no need to install anything, just click. That webpage has not only the tool but also all the information you will need to use it.
Issues, requests, help
If you open an issue on this repository, I'll see what I can do.
Running your own copy
If you are not content with running the version that's on my server because:
- You want to change or add something
- You're working with highly classified TrueType fonts
- of some other reason
.. then here's how you make it work:
Copy the files from this repository to a directory on a server that has PHP enabled. You will need support for
freetypeenabled in the PHP installation, check with
phpinfo()to see if they are there.
In this directory, add a compiled version of the Adafruit
fontconverttool (see here) and make sure it it executable to the user that runs your webserver.
Make sure the fonts/user directory is writable for the webserver user.