Merge pull request #15901 from calixteman/15289_followup

Avoid null ExpansionFactor in type1 fonts (follow-up of #15289)
This commit is contained in:
calixteman 2023-01-07 18:20:31 +01:00 committed by GitHub
commit fcaeb5db88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;