A file with .cff extension is a Compact Font Format and is also known as a PostScript Type 1, or CIDFont. CFF acts as a container to store multiple fonts together in a single unit known as a FontSet. The design of CFF fonts allow embedding PostScript language code that permits additional flexibility and extensibility of the format for usage with printer environments. CFF font files can be opened and converted using APIs such as Aspose.Font.
CFF File Format
CFF files are binary files that contain a structured data layout, has defined data types, a header, glyph organization and table dictionaries. More details about these can be found in the compact font format specifications.
The data layout of CFF file format is as shown below.
Top DICT INDEX
Global Subr INDEX
Font DICT INDEX
per-font, CIDFonts only
Local Subr INDEX
per-font or per-Private DICT for CIDFonts
Copyright and Trademark Notices
CFF data types are as shown in the following table.
1-byte unsigned number
0 – 65535
2-byte unsigned number
1, 2, 3, or 4 byte offset (specified by OffSize field)
1-byte unsigned number specifies the size of an Offset field or fields
0 – 64999
2-byte string identifier
The binary data begins with a header having the format shown in the following table.