| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
For a Type 3 font, its encoding is entirely defined by its `Encoding` dictionary (which we create), so there's no reason to use a specific encoding like `cp1252`. Instead, switch to Latin-1, which corresponds exactly to the first 256 character codes in Unicode, and can be mapped directly with `ord`.
pdf: Simplify Type 3 font character encoding
| Back | FazBrowse Home | New Git URL |
PR summary
For a Type 3 font, its encoding is entirely defined by its Encoding dictionary (which we create), so there's no reason to use a specific encoding like cp1252. Instead, switch to Latin-1, which corresponds exactly to the first 256 character codes in Unicode, and can be mapped directly with ord.
Split out of #30512.
PR checklist