Skip to content

Commit

Permalink
LibPDF: Implement most of the spec algorithm for picking TrueType glyphs
Browse files Browse the repository at this point in the history
Non-CID-keyed fonts in PDFs have 8-bit codepoints which are mapped from
bytes to character names via encoding.

TrueType fonts don't index glyphs by name (Type1 fonts do), so the fix
(codified in the spec) was to make a list of all possible glyph names
and map those to (16-bit) unicode values, and then pass those into the
truetype cmap.

(As a fallback, we're supposed to look at the optional names in the
font's "post" table. That part isn't implemented here yet.)
  • Loading branch information
nico committed Feb 24, 2024
1 parent 28805a4 commit 920518e
Show file tree
Hide file tree
Showing 5 changed files with 4,369 additions and 3 deletions.
1 change: 1 addition & 0 deletions Userland/Libraries/LibPDF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(SOURCES
Encoding.cpp
Encryption.cpp
Filter.cpp
Fonts/AdobeGlyphList.cpp
Fonts/CFF.cpp
Fonts/PDFFont.cpp
Fonts/PS1FontProgram.cpp
Expand Down
Loading

0 comments on commit 920518e

Please sign in to comment.