Hi all. I am using Arduino IDE and ESP32 with ili9341 TFT module.
Please take a look at these two commands.
They are part of a larger command that works OK.
tft.drawString("OFF", stx + 220, sty, GFXFF);
tft.drawString("ON ", stx + 220, sty, GFXFF);
Notice the space on the second command, so that the 'ON' occupy the same number of characters
as 'OFF'. The words are printed on the same location.
However when comes to display the second line i get 'ONF'.
So why spaces are not printed?
Is there a way to print spaces?
Thank you for your help.
Regards
Are you using a proportional font or a fixed width font ?
What happens if you print several spaces after the ON ?
Hi UKHlibob.
Thank you for your replay.
The fonts I am using are from AdaFruit GFX library, I assume they are proportionate.
I tried displaying several spaces, no change there.
I was wandering if , instead of a space, a control code maybe works.
But I do not know which one is OK.
Any Idea?
Regards.
The reason that I asked about the font was because I was wondering whether because of the variable character width not enough of the screen was being overwritten by the "ON " because it was not wide enough
One way of erasing previously text is to write over it in the background colour before write the new text
Another thought. Has the library got a print() function and have you tried that instead ?
b707
November 3, 2022, 1:25pm
5
the other option is draw the rectangle with background color that covering the old text
system
Closed
May 2, 2023, 1:25pm
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.