mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Fixed bitmapText kerning bug
This commit is contained in:
parent
0951a4a3d4
commit
9b2663774e
1 changed files with 3 additions and 2 deletions
|
@ -160,8 +160,9 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatr
|
|||
|
||||
if (lastGlyph !== null)
|
||||
{
|
||||
var kerningOffset = glyph.kerning[lastCharCode];
|
||||
x += (kerningOffset !== undefined) ? kerningOffset : 0;
|
||||
var kerningOffset = glyph.kerning[lastCharCode] || 0;
|
||||
x += kerningOffset;
|
||||
xAdvance += kerningOffset;
|
||||
}
|
||||
|
||||
xAdvance += glyph.xAdvance + letterSpacing;
|
||||
|
|
Loading…
Reference in a new issue