mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
limit font scale to 1 (#15367)
* limit font scale to 1 * to fix 1 * move
This commit is contained in:
@@ -148,6 +148,8 @@ export class TextProcessing {
|
||||
const maxValue = Math.max(canvasWidth * scale, canvasHeight * scale);
|
||||
scale = MAX_SIZE * scale / maxValue;
|
||||
}
|
||||
if (scale < 1) { scale = 1; }
|
||||
scale = parseFloat(scale.toFixed(1));
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user