LibPDF: Tolerate indirect references in Type0 /W array

Makes e.g. 0000236.pdf in 0000.zip in the pdfa dataset work.
This commit is contained in:
Nico Weber 2023-10-24 20:46:03 -07:00 committed by Andreas Kling
parent b928fadba7
commit 5dd7639386
Notes: sideshowbarker 2024-07-16 19:42:24 +09:00

View file

@ -143,7 +143,7 @@ PDFErrorOr<void> Type0Font::initialize(Document* document, NonnullRefPtr<DictObj
i++;
} else {
auto array = value.get<NonnullRefPtr<Object>>()->cast<ArrayObject>();
auto array = TRY(document->resolve_to<ArrayObject>(value));
auto code = pending_code.release_value();
for (auto& width : *array)
widths.set(code++, width.to_int());