Fix Label Additional Kerning All Strings

This commit is contained in:
Ahlwong 2014-10-24 08:57:37 -07:00
parent 012683bf6e
commit dfcdf10898
1 changed files with 3 additions and 5 deletions

View File

@ -390,15 +390,13 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
nextFontPositionX += charAdvance + kernings[i];
// only apply kerning shift if string contains more than 1 character
if (stringLen > 1) {
nextFontPositionX += theLabel->_additionalKerning;
}
if (longestLine < nextFontPositionX)
{
longestLine = nextFontPositionX;
}
// check longest line before adding additional kerning
nextFontPositionX += theLabel->_additionalKerning;
}
float lastCharWidth = tempDefinition.width * contentScaleFactor;