From 87313eb04377fe2a6a61f48a6e2ee3e76691f23b Mon Sep 17 00:00:00 2001 From: Turky Mohammed <45469625+DelinWorks@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:23:28 +0300 Subject: [PATCH] Update Label.cpp (#1353) --- core/2d/Label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/2d/Label.cpp b/core/2d/Label.cpp index 14c4d6a9f7..d7c180a1ee 100644 --- a/core/2d/Label.cpp +++ b/core/2d/Label.cpp @@ -3043,7 +3043,7 @@ void Label::recordLetterInfo(const ax::Vec2& point, char32_t utf32Char, int lett } _lettersInfo[letterIndex].lineIndex = lineIndex; _lettersInfo[letterIndex].utf32Char = utf32Char; - _lettersInfo[letterIndex].valid = _fontAtlas->_letterDefinitions[utf32Char].validDefinition; + _lettersInfo[letterIndex].valid = _fontAtlas->_letterDefinitions[utf32Char].validDefinition && utf32Char != ' '; _lettersInfo[letterIndex].positionX = point.x; _lettersInfo[letterIndex].positionY = point.y; _lettersInfo[letterIndex].atlasIndex = -1;