TFT_eSPI
TFT_eSPI copied to clipboard
Problem with printToSprite,
- I have a problem with printToSprite function and setTextFont/loadFont functions usage.
- IDE Arduino
- TFT_eSPI library version 2.5.43
- Board package version 20.0.11
- Procesor ESP32 ESP32 S3
- TFT driver ILI9486
- Interface type SPI
Can you explain why, the printToSprite works with loadFont function but does not work with setTextFont? Many thanks
tft.begin();
tft.setRotation(3);
spr.setColorDepth(16); // 16-bit colour needed to show anti-aliased fonts
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_RED, TFT_YELLOW); // Set the font colour and the background colour
tft.setTextDatum(TL_DATUM); // Top Centre datum
spr.setTextFont(2); // it does not work
//spr.loadFont(defaultFonts); // it works
spr.setTextColor(TFT_YELLOW, TFT_BLACK); // Set the sprite font colour and the background colour
tft.setCursor(10,10); // Set the tft cursor position, yes tft position!
spr.printToSprite("123456789"); // Prints to tft cursor position, tft cursor NOT moved