Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid null ExpansionFactor in type1 fonts (follow-up of #15289) #15901

Merged
merged 1 commit into from
Jan 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/core/type1_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down