Font Creator Now Creates Adafruit GFX Fonts

As first task for the upcoming Weather Station Color project I wanted to adapt my online font generator. Easily creating fonts in various sizes will make work on the Weather Station code a lot easier. Since my own display library doesn’t support the color TFT screen I switched to Adafruit’s library. They provide a converter but it needs to be compiled and I wanted to have this feature available on my web based font converter. So I analyzed the Adafruit font files and the converter and ported it to Java.

fontpreview

The Font Creator Preview

To create fonts which you can use in the Adafruit library follow these steps:

  1. Go to: http://oleddisplay.squix.ch/
  2. Choose font family, style and size
  3. Now Choose “Adafruit GFX Font” from Library Version dropdown
  4. Click “Create”
  5. Copy the created font into a new file in your Arduino IDE, e.g. arial14.h and add a
    #include "arial14.h"

    in your ino-file

  6. Use the font by calling
    tft.setFont(&ArialMT_14);

If you are missing fonts in the font creator please contact me. New fonts should have a license which allows me to add them to the font creator…

Do you like this post? A typical project like the ESP8266 Weather Station takes many hours of my free time to implement and even more to maintain. Maybe you feel like offering me a beer for it? Modern technology allows teleportation of beers around the world;-) It is easy and painless and much appreciated.

7 comments

  1. Keith Fowler says:

    Very cool Daniel…I’ve found your font generator to come in handy, and you keep making it better! What about adding the Meteocons font to allow scaling this into sizes other than those that you’ve included by default in your weather display?

  2. Sven Oberg says:

    This is really great. Would it be possible to add some user defined characters to the font, like umlauts and the ° sign?

  3. Ahmet KEKEC says:

    Arduino uno 32KB.
    For this reason the font file must be small.
    I just want to use the numbers.
    I will not use letters.
    I will use the Droid Sans 36
    How do I do this for Adafruit GFX font.

    So how can I make the letters ineffective?

    1. Bodmer says:

      You can manually cut out the unwanted characters but that is not easy. You might like to try the library here which has number only fonts and is designed for the limited resources of the UNO.

      https://github.com/Bodmer/TFT_ILI9341

      The larger fonts are only available in numbers and are “Run Length Encoded” so they render quickly to screen and don’t use up much space.

      Some help also here:

      http://www.instructables.com/id/Arduino-TFT-display-and-font-library/

  4. Bodmer says:

    Hi, Firstly, that font generator is great, thanks,

    There is a small bug in it though, I generated a font called Yellowtail in point size 32. There is no tilda character (~) which is code 0x7E, so the last character in the table is 0x7D. At the end of the file however the last character is declared as 0x7E, so if the ~ character is printed then garbage appears on the screen!

    The last character should be 0x7D for that font, or the ~ symbol should be included.

    1. Bodmer says:

      Above post is for the Adafruit GFX fonts. The same problem seems to occur for other fonts too.

Leave a Reply