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;