You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon. When loading new fonts it is not possible to change the color of the substrate on which they are output. If the text is displayed in the same place on the screen, then the old characters are not overwritten.
tft.setTextColor (Blue, Black); The color of the text changes, but there is no substrate. Please tell me how you can solve this problem.
The text was updated successfully, but these errors were encountered:
This is expected behaviour as proportional fonts don't have defined bounding boxes and characters may actually overlap, so clearing the character box might iteself lead to unintended behaviour.
You can use getTextBounds to get the actual bounding box for the given string (or the old string or the maximum string) and use fillRect to clear the text area.
Alternatively, you can create an extra canvas in the correct size, render your text on that canvas and then copy the canvas to your display device.
I have used the latter in my Gauges library (https://github.com/pljakobs/Arduino_Gauges) if you're looking for an example. The advantage is, that the whole text field will be displayed in one go.
Good afternoon. When loading new fonts it is not possible to change the color of the substrate on which they are output. If the text is displayed in the same place on the screen, then the old characters are not overwritten.
tft.setTextColor (Blue, Black); The color of the text changes, but there is no substrate. Please tell me how you can solve this problem.
The text was updated successfully, but these errors were encountered: