TrueType and OpenType Fonts:
PDF relevant tables 'cmap', 'glyf', 'head', 'hhea', 'hmtx', 'loca', 'maxp', ‘CFF ’, 'cvt ', 'fpgm' and 'prep'. All information about the encoding can be found in the 'cmap' table. Descriptions of glyphs are defined in the
'glyf' table. A font containing a 'CFF' table is a CFF font in an OpenType wrapper. TrueType Collections are containers for several TrueType fonts but with the same structure as a single TrueType font.
The layout is defined by several structures which are very comprehensive and partially quite complicated.
In fact only exist as OpenTpe font files. In PDF Files the OpenType wrapper can be resigned. Therefore CFF fonts can also be embedded as native format in that case. The encoding is defined in “Encoding” and/or “Charset” array and the glyph descriptions in the “CharStrings” dictionary.
CFF Fonts are a compact form of PostScript Type 1 fonts. I have to say that I really like the structure of these fonts. A parser is required for this, that doesn’t require fix structures. Encoding will be done either via the glyph name or as a CID font with help of CMap files.
PostScript Type 1 Fonts:
This are PostScript files, defining one or more font resources. In principle anything’s capable allowed in the PostScript standard. In practice 65% of all PostScript operators are used actually, you only have to know which. The encoding is defined in the “Encoding” array and the glyph descriptions in the “CharStrings” dictionary.
For such fonts, a complete PostScript parser is required and to develop this is a funny challenge by itself.