mirror of https://github.com/axmolengine/axmol.git
Don't count spaces at the end of line as part of the line width (#18751)
This commit is contained in:
parent
383c5afa6b
commit
712b093b27
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue