Skip to content

Commit

Permalink
Merge pull request #15885 from Snuffleupagus/font-update-type-subtype
Browse files Browse the repository at this point in the history
Update the `type`/`subtype` at the end of font parsing
  • Loading branch information
Snuffleupagus committed Jan 2, 2023
2 parents 42aa085 + 6bdbb5c commit da1365a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,7 @@ class Font {
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);

let type = properties.type;
let subtype = properties.subtype;
let { type, subtype } = properties;
this.type = type;
this.subtype = subtype;

Expand Down Expand Up @@ -1064,6 +1063,8 @@ class Font {
this.data = data;

// Transfer some properties again that could change during font conversion
this.type = type;
this.subtype = subtype;
this.fontMatrix = properties.fontMatrix;
this.widths = properties.widths;
this.defaultWidth = properties.defaultWidth;
Expand Down

0 comments on commit da1365a

Please sign in to comment.