diff --git a/engine/cocos2d/core/renderer/utils/label/bmfont.js b/engine/cocos2d/core/renderer/utils/label/bmfont.js index ccce272b..c4e8b4cf 100644 --- a/engine/cocos2d/core/renderer/utils/label/bmfont.js +++ b/engine/cocos2d/core/renderer/utils/label/bmfont.js @@ -232,6 +232,10 @@ export default class BmfontAssembler extends Assembler2D { } } + _clearHorizontalKerning() { + _horizontalKernings.length = 0; + } + _multilineTextWrap (nextTokenFunc) { let textLen = _string.length; diff --git a/engine/cocos2d/core/renderer/utils/label/letter-font.js b/engine/cocos2d/core/renderer/utils/label/letter-font.js index b90534e3..9b815ce7 100644 --- a/engine/cocos2d/core/renderer/utils/label/letter-font.js +++ b/engine/cocos2d/core/renderer/utils/label/letter-font.js @@ -560,7 +560,11 @@ export default class LetterFontAssembler extends WebglBmfontAssembler { return fontDesc; } - _computeHorizontalKerningForText () {} + + _computeHorizontalKerningForText () { + this._clearHorizontalKerning(); + } + _determineRect (tempRect) { return false; }