diff options
author | Rodrigo Tobar <rtobarc@gmail.com> | 2023-02-06 00:11:43 +0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-02-08 19:47:15 +0100 |
commit | 596119cf3eaec828df1055333cfb78be5172df1b (patch) | |
tree | ad03b2e226f993df659dd500b662a825debb41c1 /Userland/Libraries/LibPDF | |
parent | 64bbe431b5174e2ed360bceb4141b274bbe7fcb9 (diff) | |
download | serenity-596119cf3eaec828df1055333cfb78be5172df1b.zip |
LibPDF: Add placeholders for *flex Type2 commands
These should be implemented properly in the future, but for now we are
adding the as placeholders to avoid crashes.
Diffstat (limited to 'Userland/Libraries/LibPDF')
-rw-r--r-- | Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp index 539e4c766c..920e344927 100644 --- a/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp +++ b/Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp @@ -46,6 +46,10 @@ enum ExtendedCommand { CallOtherSubr = 16, Pop, SetCurrentPoint = 33, + Hflex, + Flex, + Hflex1, + Flex1, }; RefPtr<Gfx::Bitmap> Type1FontProgram::rasterize_glyph(u32 char_code, float width, Gfx::GlyphSubpixelOffset subpixel_offset) @@ -412,6 +416,14 @@ PDFErrorOr<Type1FontProgram::Glyph> Type1FontProgram::parse_glyph(ReadonlyBytes break; } + case Hflex: + case Flex: + case Hflex1: + case Flex1: + // TODO: implement these + state.sp = 0; + break; + default: return error(DeprecatedString::formatted("Unhandled command: 12 {}", data[i])); } |