mirror of https://github.com/axmolengine/axmol.git
Fix kerning on signle characters
This commit is contained in:
parent
dd5c5a29b9
commit
012683bf6e
|
@ -388,7 +388,12 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextFontPositionX += charAdvance + kernings[i] + theLabel->_additionalKerning;
|
nextFontPositionX += charAdvance + kernings[i];
|
||||||
|
|
||||||
|
// only apply kerning shift if string contains more than 1 character
|
||||||
|
if (stringLen > 1) {
|
||||||
|
nextFontPositionX += theLabel->_additionalKerning;
|
||||||
|
}
|
||||||
|
|
||||||
if (longestLine < nextFontPositionX)
|
if (longestLine < nextFontPositionX)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue