From fc9b2440bd80673f00345aec24abe70ccf27a877 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 1 Mar 2024 08:45:08 -0500 Subject: [PATCH] LibPDF: Add some spec comments in Type0Font::initialize() --- Userland/Libraries/LibPDF/Fonts/Type0Font.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp b/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp index a2f93999f4..1b6dca54dd 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type0Font.cpp @@ -273,12 +273,14 @@ PDFErrorOr Type0Font::initialize(Document* document, NonnullRefPtrcontains(CommonNames::DW)) default_width = descendant_font->get_value(CommonNames::DW).to_int(); + // "The W array allows the definition of widths for individual CIDs." HashMap widths; - if (descendant_font->contains(CommonNames::W)) { auto widths_array = MUST(descendant_font->get_array(document, CommonNames::W)); Optional pending_code;