Created 8 pixel high bold font for Adafruit GFX lib (useful on a 128 x 64 display)

Status
Not open for further replies.

Darcy

Well-known member
View attachment FreeMono9pt7b.h
In the process of migrating from U8glib to Adafruit libraries I discovered that:

1) the 48 bundled fonts in GFX only service a few font sizes, with nothing between 5pixels and 12 pixels high.
2) The quality of the provided fonts were poor, (glyph spacing and alignment)

Having tried to get the Adafruit FontConvert util working on cygwin (a few hours lost), and fettled with numerous free tools (a few nights lost), I have finally got an 8 pixel font in pretty good shape for my project.

I have never produced anything worth sharing before, but thought someone might find this useful.

Rename your original file in your library to something else (in case you want to put it back at a later date), and drop this file in it's place. Include and Setfont in your sketch in the usual adafruit-learning documented way.

Darcy.
 
What did you end up using to make this? I also tried a bajillion things to make or convert fonts and wan't happy with any of them :/
 
It seems a bit buggy, but I found this Adafruit GFX Pixel Font Customizer helpful: https://tchapi.github.io/Adafruit-GFX-Font-Customiser/

Using that, it looks like your font isn't really 8 pixels tall: the descenders on Q, j, g, etc. make some of these 9 or 10 pixels, and many go below the baseline so I don't think they would render on an 8-pixel display (what I'm currently working on). Maybe I'll tweak this to get a font that really fits in 8 pixels.

I tried Adafruit's fontconvert thing but its results weren't that great for tiny fonts converted from .ttf; I think these really need to be done by hand.

BTW, points vs pixels: https://reeddesign.co.uk/test/points-pixels.html
 
Status
Not open for further replies.
Back
Top