1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-23 05:27:40 +00:00
serenity/Userland/Libraries/LibPDF/Fonts
Rodrigo Tobar 286e3e6872 LibPDF: Simplify Encoding to align with simple font requirements
All "Simple Fonts" in PDF (all but Type0 fonts) have the property that
glyphs are selected with single byte character codes. This means that
the Encoding objects should use u8 for representing these character
codes. Moreover, and as mentioned in a previous commit, there is no need
to store the unicode code point associated with a character (which was
in turn wrongly associated to a glyph).

This commit greatly simplifies the Encoding class. Namely it:

 * Removes the unnecessary CharDescriptor class.
 * Changes the internal maps to be u8 -> FlyString and vice-versa,
   effectively providing two-way lookups.
 * Adds a new method to set a two-way u8 -> FlyString mapping and uses
   it in all possible places.
 * Simplified the creation of Encoding objects.
 * Changes how the WinAnsi special treatment for bullet points is
   implemented.
2023-02-02 14:50:38 +01:00
..
CFF.cpp LibPDF: Simplify Encoding to align with simple font requirements 2023-02-02 14:50:38 +01:00
CFF.h LibPDF: Add initial CFF parsing 2023-01-25 15:40:11 +01:00
PDFFont.cpp LibPDF: Record base font name read from document 2023-01-25 15:40:11 +01:00
PDFFont.h LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
PS1FontProgram.cpp LibPDF: Simplify Encoding to align with simple font requirements 2023-02-02 14:50:38 +01:00
PS1FontProgram.h LibPDF: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
TrueTypeFont.cpp LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
TrueTypeFont.h LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
Type0Font.cpp LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
Type0Font.h LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
Type1Font.cpp LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
Type1Font.h LibPDF: Stop calculating code points for glyphs 2023-02-02 14:50:38 +01:00
Type1FontProgram.cpp LibPDF: Augment Type11FontProgram with Type2 capabilities 2023-01-25 15:40:11 +01:00
Type1FontProgram.h LibPDF: Augment Type11FontProgram with Type2 capabilities 2023-01-25 15:40:11 +01:00