File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
407
407
}
408
408
}
409
409
410
- letterPosition.x = (nextFontPositionX + charXOffset + kernings[i] ) / contentScaleFactor;
410
+ letterPosition.x = (nextFontPositionX + charXOffset) / contentScaleFactor;
411
411
letterPosition.y = (nextFontPositionY - charYOffset) / contentScaleFactor;
412
412
413
413
if ( theLabel->recordLetterInfo (letterPosition, tempDefinition, i) == false )
@@ -417,6 +417,10 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel)
417
417
}
418
418
419
419
nextFontPositionX += charAdvance + theLabel->_additionalKerning ;
420
+ if (i < stringLen - 1 )
421
+ {
422
+ nextFontPositionX += kernings[i + 1 ];
423
+ }
420
424
421
425
auto letterRight = letterPosition.x + tempDefinition.width ;
422
426
if (longestLine < letterRight)
You can’t perform that action at this time.
0 commit comments