From c9234f35f12a835d84a259b669bb1821c7dfe493 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 21 Feb 2024 16:11:38 -0500 Subject: [PATCH] LibPDF/CFF: Clear stack after "endchar" commands Both type 1 and type 2 spec tell us to do this. I haven't observed a difference from this, but I noticed it in the spec while I was touching this code. Probably good to do what the spec tells us to do. --- Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp index d7d06789c7..88619ed8c4 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp @@ -663,6 +663,7 @@ PDFErrorOr Type1FontProgram::parse_glyph(ReadonlyBytes } path.close(); } + state.sp = 0; break; }