limit font scale to 1 (#15367)

* limit font scale to 1

* to fix 1

* move
This commit is contained in:
ChiaNing
2023-06-08 17:48:48 +08:00
committed by GitHub
parent 2091f4617a
commit a88cdecadf
@@ -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;
}