From 44dd12a6fe89eea03bc2f002edd652d03365f0c4 Mon Sep 17 00:00:00 2001 From: LeeYip <2274086727@qq.com> Date: Wed, 14 Sep 2022 11:42:39 +0800 Subject: [PATCH] [fix] bmfont uv bug when overflow is clamp (#12374) --- cocos/2d/assembler/label/bmfontUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/assembler/label/bmfontUtils.ts b/cocos/2d/assembler/label/bmfontUtils.ts index 33f97c0e1d..17540ccd52 100644 --- a/cocos/2d/assembler/label/bmfontUtils.ts +++ b/cocos/2d/assembler/label/bmfontUtils.ts @@ -632,7 +632,7 @@ export const bmfontUtils = { py -= clipTop; } - if ((py - letterDef.h * _bmfontScale < _tailoredBottomY) && _overflow === Overflow.CLAMP) { + if ((py - _tmpRect.height * _bmfontScale < _tailoredBottomY) && _overflow === Overflow.CLAMP) { _tmpRect.height = (py < _tailoredBottomY) ? 0 : (py - _tailoredBottomY) / _bmfontScale; } }