From 9aa31157d59fb0f993ea831227dbc29bab64e7e4 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 27 Feb 2024 09:09:09 -0500 Subject: [PATCH] LibPDF: Use right encoding for standard fonts Symbol and ZapfDingbats We use Liberation Sans for the actual glyph for these, and that's missing some (Symbol) / all (ZapfDingbats) of the glyphs we need for these two standard fonts (...or at least the mapping from name to glyph, not sure). But still, better rendering squares than completely incorrect glpyhs. Our code deciding what to do when a value isn't found in an encoding, or when the name doesn't map to a glpyh, also needs work, but that's mostly independent of this change. I think this is a nice small standalone progression. --- Userland/Libraries/LibPDF/Fonts/Type1Font.cpp | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp b/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp index 671047d449..82913c0fff 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp @@ -54,8 +54,28 @@ PDFErrorOr Type1Font::initialize(Document* document, NonnullRefPtr