Revert "Corrext teztwrap limit (Issue #18)"

This reverts commit 4230f6bc30.
This commit is contained in:
Bodmer
2017-05-22 23:41:56 +01:00
parent 4230f6bc30
commit a2ab44f106
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2773,7 +2773,7 @@ size_t TFT_eSPI::write(uint8_t utf8)
}
else
{
if (textwrap && (cursor_x + width * textsize > _width))
if (textwrap && (cursor_x + width * textsize >= _width))
{
cursor_y += height;
cursor_x = 0;
@@ -2801,7 +2801,7 @@ size_t TFT_eSPI::write(uint8_t utf8)
h = pgm_read_byte(&glyph->height);
if((w > 0) && (h > 0)) { // Is there an associated bitmap?
int16_t xo = (int8_t)pgm_read_byte(&glyph->xOffset);
if(textwrap && ((cursor_x + textsize * (xo + w)) > _width)) {
if(textwrap && ((cursor_x + textsize * (xo + w)) >= _width)) {
// Drawing character would go off right edge; wrap to new line
cursor_x = 0;
cursor_y += (int16_t)textsize *