Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

How to use fonts like freesans5pt7b.h file in stm

Open 25prithvi opened this issue 5 years ago • 1 comments

So I want to use the fonts .h files in STM which have .c files, but not .cpp file.

I went through the .h files of different fonts and where there are 2 structures i.e GFXfont and GFXglyph.

So how to decode it to get a character that I can print on the screen?

If you can provide a flowchart or algorithm for decoding the font .h file then it'll really help me a lot. Basically how to use the bitmap, bitmapoffset, etc.

I am able to print different logos using the bitmap but I am not able to use the bitmap in these fonts .h file.

25prithvi avatar May 28 '20 12:05 25prithvi

This guide might help. It features a deep dive into the font format.

https://learn.adafruit.com/creating-custom-symbol-font-for-adafruit-gfx-library/understanding-the-font-specification

BillyDonahue avatar May 28 '20 15:05 BillyDonahue