Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Other
3.68k stars 1.06k forks source link

ILI9341 and Fonts #1845

Closed GurraE closed 2 years ago

GurraE commented 2 years ago

Hello. I am using the ILI9341 display with your TFT_eSPI library and a ESP32.

Everything is working fine, (I have been using your libraries för ESP8266, ESP32, ILI9341, ILI9488 etc. and everything is working just fine, but I want to use Font Sizes larger than the 24 point fonts in the Fonts/GFXFF folder. In the Fonts/TrueType Folder there are a number of fonts larger than 24 points (Font64rle.c/Font64rlt.h) etc. but there is also a file in that folder saying “Not yet supported”. Thats a bit confusing. Can i use them and if so, how ??

I have also created a font using the https://oleddisplay.squix.ch/ font creator for the ili9341, but where do i put them, and how do i access them in my sketch ??

Bodmer commented 2 years ago

A few types of fonts are supported, at the moment the "True type" fonts are not supported. There should be no font files in that folder, it is for possible future use.

The Font64rle is referenced as font 6 in the examples, but note the font only contains characters [space] 0 1 2 3 4 5 6 7 8 9 : - . a p m

Custom GFX free font compatible format files from the squix online tool can be included as a header in your sketch. See Local_Custom_Fonts example.

Bodmer commented 1 year ago

This may be of interest. There is a library here: https://github.com/takkaO/OpenFontRender That supports rendering of TrueType fonts. Due to the complexity of the code required to convert the font format to a pixel may this is quite slow to render but may be of interest for static text.