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

LibPDF: Override Type 1 character mappings by encoding in font dict

If the font dictionary includes an "Encoding" entry, it will be used
instead of the PS1FontProgram's built-in encoding.
This commit is contained in:
Julian Offenhäuser 2022-11-23 11:27:39 +01:00 committed by Andreas Kling
parent 65ff80e8a5
commit e06a065594
3 changed files with 24 additions and 16 deletions

View file

@ -18,7 +18,7 @@ class Encoding;
class PS1FontProgram : public RefCounted<PS1FontProgram> {
public:
PDFErrorOr<void> parse(ReadonlyBytes const&, size_t cleartext_length, size_t encrypted_length);
PDFErrorOr<void> create(ReadonlyBytes const&, RefPtr<Encoding>, size_t cleartext_length, size_t encrypted_length);
RefPtr<Gfx::Bitmap> rasterize_glyph(u32 char_code, float width);
Gfx::Path build_char(u32 char_code, float width);