1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

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.
This commit is contained in:
Rodrigo Tobar 2023-02-06 00:11:43 +08:00 committed by Andreas Kling
parent 64bbe431b5
commit 596119cf3e

View file

@ -46,6 +46,10 @@ enum ExtendedCommand {
CallOtherSubr = 16, CallOtherSubr = 16,
Pop, Pop,
SetCurrentPoint = 33, SetCurrentPoint = 33,
Hflex,
Flex,
Hflex1,
Flex1,
}; };
RefPtr<Gfx::Bitmap> Type1FontProgram::rasterize_glyph(u32 char_code, float width, Gfx::GlyphSubpixelOffset subpixel_offset) 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; break;
} }
case Hflex:
case Flex:
case Hflex1:
case Flex1:
// TODO: implement these
state.sp = 0;
break;
default: default:
return error(DeprecatedString::formatted("Unhandled command: 12 {}", data[i])); return error(DeprecatedString::formatted("Unhandled command: 12 {}", data[i]));
} }