Add even more validation of width-data (PR 18017 follow-up)
I missed this case in PR 18017, sorry about that.
This commit is contained in:
parent
16dbf5dcfd
commit
6c05f8b381
@ -4315,11 +4315,15 @@ class PartialEvaluator {
|
||||
dict,
|
||||
properties
|
||||
);
|
||||
if (widths) {
|
||||
if (Array.isArray(widths)) {
|
||||
const glyphWidths = [];
|
||||
let j = firstChar;
|
||||
for (const width of widths) {
|
||||
glyphWidths[j++] = this.xref.fetchIfRef(width);
|
||||
for (const w of widths) {
|
||||
const width = this.xref.fetchIfRef(w);
|
||||
if (typeof width === "number") {
|
||||
glyphWidths[j] = width;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
newProperties.widths = glyphWidths;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user