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,8 +236,11 @@ bool Label::multilineTextWrap(const std::function<int(const std::u32string&, int
|
||||||
nextLetterX += _horizontalKernings[letterIndex + 1];
|
nextLetterX += _horizontalKernings[letterIndex + 1];
|
||||||
nextLetterX += letterDef.xAdvance * _bmfontScale + _additionalKerning;
|
nextLetterX += letterDef.xAdvance * _bmfontScale + _additionalKerning;
|
||||||
|
|
||||||
|
if (tokenLen != 1 || !StringUtils::isUnicodeSpace(character))
|
||||||
|
{
|
||||||
tokenRight = nextLetterX / contentScaleFactor;
|
tokenRight = nextLetterX / contentScaleFactor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
nextChangeSize = true;
|
nextChangeSize = true;
|
||||||
|
|
||||||
if (tokenHighestY < letterPosition.y)
|
if (tokenHighestY < letterPosition.y)
|
||||||
|
|
Loading…
Reference in New Issue