Update the type
/subtype
at the end of font parsing
This fixes a warning reported by CodeQL, and should also make general sense given that we parse the font-data to determine the *actual* `type`/`subtype` rather than trusting the PDF document.
This commit is contained in:
parent
42aa08563b
commit
6bdbb5c5ca
@ -945,8 +945,7 @@ class Font {
|
|||||||
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
||||||
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
|
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
|
||||||
|
|
||||||
let type = properties.type;
|
let { type, subtype } = properties;
|
||||||
let subtype = properties.subtype;
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.subtype = subtype;
|
this.subtype = subtype;
|
||||||
|
|
||||||
@ -1064,6 +1063,8 @@ class Font {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
||||||
// Transfer some properties again that could change during font conversion
|
// Transfer some properties again that could change during font conversion
|
||||||
|
this.type = type;
|
||||||
|
this.subtype = subtype;
|
||||||
this.fontMatrix = properties.fontMatrix;
|
this.fontMatrix = properties.fontMatrix;
|
||||||
this.widths = properties.widths;
|
this.widths = properties.widths;
|
||||||
this.defaultWidth = properties.defaultWidth;
|
this.defaultWidth = properties.defaultWidth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user