From 1b5151f96933e6e32671e6733e00a60470853911 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 8 Mar 2025 12:22:33 +0100 Subject: [PATCH] Remove pointless `Math.min` usage in the XFA parsing When creating the `StyleMapping` for the "xfa-font-horizontal-scale" and "xfa-font-vertical-scale" properties there's currently pointless `Math.min` usage, since we're not actually comparing with anything. --- src/core/xfa/xhtml.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/xfa/xhtml.js b/src/core/xfa/xhtml.js index c7db14c5d..b478b832b 100644 --- a/src/core/xfa/xhtml.js +++ b/src/core/xfa/xhtml.js @@ -81,13 +81,11 @@ const StyleMapping = new Map([ ["kerning-mode", value => (value === "none" ? "none" : "normal")], [ "xfa-font-horizontal-scale", - value => - `scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`, + value => `scaleX(${Math.max(0, parseInt(value) / 100).toFixed(2)})`, ], [ "xfa-font-vertical-scale", - value => - `scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`, + value => `scaleY(${Math.max(0, parseInt(value) / 100).toFixed(2)})`, ], ["xfa-spacerun", ""], ["xfa-tab-stops", ""],