Hi!
I'm having trouble selecting the font type for the text on the display st7735.
how do I do?
I tried: TFTscreen.setTextFont ();
but there was an error...
I'm using the TFT and SPI library
for example:
TFTscreen.begin ();
TFTscreen.setRotation (0);
TFTscreen.background (0, 0, 0);
David!
I'm using #include <TFT_eSPI.h> #include <SPI.h> #include <TFT.h>
this #include <Fonts / FreeSans9pt7b.h> is Adafruit.
creates conflicts with the TFT library
TFT.h is a complete abortion. Avoid it like the Plague.
TFT_eSPI.h is an excellent library intended for ESP8266, ESP32, STM32, Raspberry Pi Pico boards.
It should work just fine with Adafruit_GFX style programs and Fonts.
As always, run all the TFT_eSPI library examples before attempting to write your own sketch.
I thank you for your attention, but I have an extensive code, and to change the libraries now it would be a lot of work, so I am looking for a solution within TFT.
if you can't, i'll have to redo all the code
Seriously. TFT.h is a complete abortion with totally weird methods that were hooked onto an obsolete version of Adafruit_ST7735. You will have no end of problems if you use it with any proper application.
I strongly advise using Adafruit_GFX style classes. e.g. Bodmer's TFT_eSPI or a current Adafruit_ST7735
Yes, there might be a lot of work in converting TFT.h programs. But it is a wise move.
I doubt if TFT.h will even compile with ESP8266 or ESP32