From 5dd76393869116bd4767ad3508df0d70545ee055 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 24 Oct 2023 20:46:03 -0700 Subject: [PATCH] LibPDF: Tolerate indirect references in Type0 /W array Makes e.g. 0000236.pdf in 0000.zip in the pdfa dataset work. --- Userland/Libraries/LibPDF/Fonts/Type0Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp b/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp index 714be2ebce..b417d85b9f 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp @@ -143,7 +143,7 @@ PDFErrorOr Type0Font::initialize(Document* document, NonnullRefPtr>()->cast(); + auto array = TRY(document->resolve_to(value)); auto code = pending_code.release_value(); for (auto& width : *array) widths.set(code++, width.to_int());