1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +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)) {