mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Always use DW if it's a number for the font default width (bug 1903731)
This commit is contained in:
parent
9afd3a5b2f
commit
8c9a665728
3 changed files with 11 additions and 1 deletions
|
@ -3905,7 +3905,7 @@ class PartialEvaluator {
|
||||||
let defaultVMetrics;
|
let defaultVMetrics;
|
||||||
if (properties.composite) {
|
if (properties.composite) {
|
||||||
const dw = dict.get("DW");
|
const dw = dict.get("DW");
|
||||||
defaultWidth = Number.isInteger(dw) ? dw : 1000;
|
defaultWidth = typeof dw === "number" ? Math.ceil(dw) : 1000;
|
||||||
|
|
||||||
const widths = dict.get("W");
|
const widths = dict.get("W");
|
||||||
if (Array.isArray(widths)) {
|
if (Array.isArray(widths)) {
|
||||||
|
|
2
test/pdfs/bug1903731.pdf.link
Normal file
2
test/pdfs/bug1903731.pdf.link
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
https://bugzilla.mozilla.org/attachment.cgi?id=9408642
|
||||||
|
|
|
@ -10088,5 +10088,13 @@
|
||||||
"md5": "73922be020083d54747af18a4d5e0768",
|
"md5": "73922be020083d54747af18a4d5e0768",
|
||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bug1903731",
|
||||||
|
"file": "pdfs/bug1903731.pdf",
|
||||||
|
"md5": "c90d1b03a62d0221e5f5609e3db16a38",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue