Incorporate TTF file in C

glcdstm32f3

I have migrated from a 16×2 alpha-numeric display to a 128×64 graphical in existing project. With that in mind, I am planning on using a larger font instead of the "easy" 5×7. How do I integrate TTF font file in C?? How to generate hex for the same?

Best Answer

TTF is a vector font format, you first need to convert it into a bitmap with 1 bit color depth, then load it as an array in your code.

GIMP can save the bitmap as a C array.