1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #18306 from calixteman/bug1903731

Always use DW if it's a number for the font default width (bug 1903731)
This commit is contained in:
calixteman 2024-06-20 16:52:29 +02:00 committed by GitHub
commit a081dd25eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)) {