From c170245fc0744072422c9dfa9dd147264c9799a9 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Sat, 7 Jan 2023 16:19:17 +0100 Subject: [PATCH] Avoid null ExpansionFactor in type1 fonts (follow-up of #15289) --- src/core/type1_parser.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/type1_parser.js b/src/core/type1_parser.js index e43debfb1..ca5c78bba 100644 --- a/src/core/type1_parser.js +++ b/src/core/type1_parser.js @@ -654,9 +654,14 @@ class Type1Parser { case "BlueFuzz": case "BlueScale": case "LanguageGroup": - case "ExpansionFactor": program.properties.privateData[token] = this.readNumber(); break; + case "ExpansionFactor": + // Firefox doesn't render correctly a font with a null factor on + // Windows (see issue 15289), hence we just reset it to its default + // value (0.06). + program.properties.privateData[token] = this.readNumber() || 0.06; + break; case "ForceBold": program.properties.privateData[token] = this.readBoolean(); break;