1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Take the absolute value of the font size when the annotation contents is in xhtml (bug 1938087)

This commit is contained in:
Calixte Denizet 2024-12-18 17:00:45 +01:00
parent 8985d80aef
commit 723ee9bc8c
2 changed files with 43 additions and 1 deletions

View file

@ -94,7 +94,8 @@ const StyleMapping = new Map([
[
"font-size",
(value, original) => {
value = original.fontSize = getMeasurement(value);
// The font size must be positive.
value = original.fontSize = Math.abs(getMeasurement(value));
return measureToString(0.99 * value);
},
],