[feature request] Overflow flag for tft.println() #308
Replies: 3 comments
-
Thanks for the suggestion. A flag to indicate a wrap has occured on the X axis might also prove useful. I will think on this further as there are also other potential status or error flags that could be useful. |
Beta Was this translation helpful? Give feedback.
-
Another great feature would be an option to have fonts be true monospaced. |
Beta Was this translation helpful? Give feedback.
-
Just noted that every time I issue loadFont() the current font will be unloaded and the requested one loaded, even if the new one is the same as the old one. |
Beta Was this translation helpful? Give feedback.
-
I use
tft.println()
withtft.setTextWrap(true, false)
to print strings of unknown length on the top half of the screen, then checkgetCursorY()
if I went over 1/2 - if not I add a picture, otherwise I leave the rest blank.This only works until the cursor overshoots the screen's Y resolution.
From Smooth_font.cpp:
if (cursor_y >= _height) cursor_y = 0;
Maybe we can add a flag here that tells if the last operation overshot Y?
I quickly did that for my project and it works:
Declaration in Smooth_font.h:
virtual bool getOvershot();
In Smooth_font.cpp I added:
And edited drawGlyph():
Maybe you could adapt this in some form?
Feel free to code it properly ;-)
Beta Was this translation helpful? Give feedback.
All reactions