Fix kerning on signle characters

This commit is contained in:
Ahlwong 2014-10-23 21:18:51 -07:00
parent dd5c5a29b9
commit 012683bf6e
1 changed files with 7 additions and 2 deletions

View File

@ -387,8 +387,13 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
log("WARNING: can't find letter definition in font file for letter: %c", c);
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)
{