Don't count spaces at the end of line as part of the line width (#18751)

This commit is contained in:
Jordi Vilalta Prat 2018-04-04 05:53:16 +02:00 committed by minggo
parent 383c5afa6b
commit 712b093b27
1 changed files with 4 additions and 1 deletions

View File

@ -236,7 +236,10 @@ bool Label::multilineTextWrap(const std::function<int(const std::u32string&, int
nextLetterX += _horizontalKernings[letterIndex + 1];
nextLetterX += letterDef.xAdvance * _bmfontScale + _additionalKerning;
tokenRight = nextLetterX / contentScaleFactor;
if (tokenLen != 1 || !StringUtils::isUnicodeSpace(character))
{
tokenRight = nextLetterX / contentScaleFactor;
}
}
nextChangeSize = true;