From e4a7606b81d1ccac57f7a7ccdf4e4e52d930ec95 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Sun, 5 Feb 2023 14:25:57 +0800 Subject: [PATCH] LibPDF: Construct accented characters with Type1 seac command The seac command provides the base and accented character that are needed to create an accented character glyph. Storing these values is all that was left to properly support these composed glyphs. --- Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp index 649fec3728..584a16c3eb 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp @@ -397,11 +397,21 @@ PDFErrorOr Type1FontProgram::parse_glyph(ReadonlyBytes case DotSection: case VStem3: case HStem3: - case Seac: // FIXME: Do something with these? state.sp = 0; break; + case Seac: { + auto achar = pop(); + auto bchar = pop(); + auto ady = pop(); + auto adx = pop(); + // auto asb = pop(); + state.glyph.set_accented_character(AccentedCharacter { (u8)bchar, (u8)achar, adx, ady }); + state.sp = 0; + break; + } + case Div: { auto num2 = pop(); auto num1 = pop();