mirror of https://github.com/axmolengine/axmol.git
Fix kerning on signle characters
This commit is contained in:
parent
dd5c5a29b9
commit
012683bf6e
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue