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

Always use DW if it's a number for the font default width (bug 1903731)

This commit is contained in:
Calixte Denizet 2024-06-20 15:30:56 +02:00
parent 9afd3a5b2f
commit 8c9a665728
3 changed files with 11 additions and 1 deletions

View file

@ -3905,7 +3905,7 @@ class PartialEvaluator {
let defaultVMetrics;
if (properties.composite) {
const dw = dict.get("DW");
defaultWidth = Number.isInteger(dw) ? dw : 1000;
defaultWidth = typeof dw === "number" ? Math.ceil(dw) : 1000;
const widths = dict.get("W");
if (Array.isArray(widths)) {

View file

@ -0,0 +1,2 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9408642

View file

@ -10088,5 +10088,13 @@
"md5": "73922be020083d54747af18a4d5e0768",
"rounds": 1,
"type": "eq"
},
{
"id": "bug1903731",
"file": "pdfs/bug1903731.pdf",
"md5": "c90d1b03a62d0221e5f5609e3db16a38",
"rounds": 1,
"link": true,
"type": "eq"
}
]