Finding Adafruit GFX Font Width Specs

I'm new to TFT displays and I am trying to use the Adafruit GFX library. I'm trying to find a tall font but I don't see any pixel width dimensions to help me decide tallness. There is a height dimension in the font name (e.g., FreeMono9pt7b.h is 9pts high), but I can't find a width dimension anywhere.

Is there an easy way to find height and width dimensions to help me find a tall font?

I need a tall font to maximize the readability for a simple time display. IOW, an example time of "12:30" that utilizes the full width of my TFT should be more readable at distance if the digits were somewhat taller.

There are a fixed and variable width fonts. The width of the first is defined at the heading of the font file, the variable width fonts does not have a single defined width, of course.
The most of AdafruitGFX fonts are variable width ones.

I had previously stumbled across the below URL which led me to believe that there are different widths even for variable width fonts. I know that xadvance is not the same as width, but it is probably related.

I tried to pick a tall font using the ratio of x and y advance on that URL for a couple of different fonts, but maybe I should try a few more.

https://forum.arduino.cc/t/adafruit-gfx-font-size-points-to-pixels-for-epapers/556091/2

I think I found a solution using the Adafruit font generator. One of the first steps is to select a font to be created from the Windows font folder. That folder displays the font and there are lots of different width fonts displayed there.
Next problem is to learn how to use the Adafruit font generator. Judging from a youtube video it's a multistep process and a little involved, but looks doable. I'll give it a try when I get some time.

Any comments are welcome.

There's a demo that displays all the fonts.

https://rop.nl/truetype2gfx/

There's also an Adafruit learning guide on the GFX library.

If you going to use only latin chars, the procesd is quite simple.
Please note, hovewear, that in most cases you will need to tune the generated font manually.

Thanks everyone for the comments, I followed every one of them.

One disappointment is that I cannot find an image display of the Adafruit fonts. Adafruit seems to do a great job with lots of their GXF documentation so It seems unfathomable that such images do not exist, as I'm pretty sure most users would need them.
Can anybody point me to those images?

See post #5 in this thread.

Yes, I was thrilled when I saw your message. But I looked all over and could not find it. Can you provide more info or a link?

I was wrong: it's a TFT_eSPI demo, not an Adafruit demo. However TFT_eSPI is based on the Adafruit GFX code so if you create the tft object in the demo using an Adafruit class all the calls should work. e.g.,

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

Warning: I haven't tested it :slight_smile:

Thanks, cedarlakeinstruments,
I'm not a real savvy programmer and I'm using an esp8266 but I'll give it a try.

You might want to consider using a fixed-width font for a clock display. With a variable-width font, the colon may move around a bit with the width of the numbers.

david_2018,
Interesting point, I'll keep that in mind.
Thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.