From 047d080346eff3606eb4144a8b4b9844558f747f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 21 Aug 2022 21:24:46 +0200 Subject: [PATCH] Fixed a small text abbreviation issue. --- es-core/src/resources/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 5b6da2d07..602497f48 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -529,7 +529,7 @@ std::string Font::wrapText(std::string text, float maxLength, float maxHeight, f // If the word is too long to fit within maxLength then abbreviate it. if (sizeText(word).x > maxLength) { - if (line != "") { + if (line != "" && line.back() != '\n') { if (restrictHeight) { if (accumHeight + lineHeight > maxHeight) continue;