Encodings
The four simple-font encodings PDF defines, as tables indexed by byte code.
pdfDocToUnicode maps a PDFDocEncoding byte to a Unicode codepoint (0 where the code is undefined). The other three map a byte to a PostScript glyph name (null where undefined), which is what a simple font's /Encoding selects glyphs by.
Where these values come from
ISO 32000-1, Annex D defines all four. They are reproducible from public, freely usable data, and the test suite checks the reproduction rules rather than trusting the numbers:
WinAnsiEncoding is Windows code page 1252, with three rules from Annex D: code 240 (0xA0) shows as
space, 255 (0xAD) ashyphen, and every code above 040 (octal) that the page leaves unused shows asbullet.MacRomanEncoding is Mac OS Roman for Latin text, so the codes whose Mac OS glyph falls outside that repertoire (the mathematical operators, Greek letters, the lozenge and the private-use logo) are undefined here. Code 312 (0xCA) shows as
space, and 333 (0xDB) keepscurrency, the assignment Mac OS used before 8.5 replaced it with the Euro.StandardEncoding is Adobe's StandardEncoding for Type 1 fonts. It matches ASCII across 040 to 176 (octal) except that 047 is
quoterightand 140 isquoteleft.PDFDocEncoding is Latin-1, with the accent block at 030 to 037 (octal), the typographic set at 200 to 237, the Euro at 240 (0xA0) instead of a no-break space, and 177 (DEL) and 255 (soft hyphen) left undefined.
Glyph names follow the Adobe Glyph List (see GlyphList).
Properties
MacExpertEncoding: byte to glyph name, null where undefined.
MacRomanEncoding: byte to glyph name, null where undefined.
PDFDocEncoding byte to Unicode codepoint; 0 where the code is undefined.
Adobe StandardEncoding: byte to glyph name, null where undefined.
WinAnsiEncoding: byte to glyph name, null where undefined.