[engine] Fix the character spacing error in the rendering of Label under Char Mode

This commit is contained in:
SmallMain 2024-11-27 15:42:51 +08:00
parent 9b5704db02
commit 8b254fb84d
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View File

@ -232,6 +232,10 @@ export default class BmfontAssembler extends Assembler2D {
} }
} }
_clearHorizontalKerning() {
_horizontalKernings.length = 0;
}
_multilineTextWrap (nextTokenFunc) { _multilineTextWrap (nextTokenFunc) {
let textLen = _string.length; let textLen = _string.length;

View File

@ -560,7 +560,11 @@ export default class LetterFontAssembler extends WebglBmfontAssembler {
return fontDesc; return fontDesc;
} }
_computeHorizontalKerningForText () {}
_computeHorizontalKerningForText () {
this._clearHorizontalKerning();
}
_determineRect (tempRect) { _determineRect (tempRect) {
return false; return false;
} }