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

Merge pull request #19238 from calixteman/bug1938087

Take the absolute value of the font size when the annotation contents is in xhtml (bug 1938087)
This commit is contained in:
calixteman 2024-12-18 17:34:06 +01:00 committed by GitHub
commit 2df5d8f3ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);
},
],