Next: , Previous: Introduction, Up: PFF2 Font File Format


10.2 File Structure

A file section consists of a 4-byte name, a 32-bit big-endian length (not including the name or length), and then length more section-type-specific bytes.

The standard file extension for PFF2 font files is .pf2.

10.2.1 Section Types

FILE
File type ID (ASCII string). This must be the first section in the file. It has length 4 and the contents are the four bytes of the ASCII string ‘PFF2’.
NAME
Font name (ASCII string). This is the full font name including family, weight, style, and point size. For instance, "Helvetica Bold Italic 14".
FAMI
Font family name (ASCII string). For instance, "Helvetica". This should be included so that intelligent font substitution can take place.
WEIG
Font weight (ASCII string). Valid values are ‘bold’ and ‘normal’. This should be included so that intelligent font substitution can take place.
SLAN
Font slant (ASCII string). Valid values are ‘italic’ and ‘normal’. This should be included so that intelligent font substitution can take place.
PTSZ
Font point size (uint16be).
MAXW
Maximum character width in pixels (uint16be).
MAXH
Maximum character height in pixels (uint16be).
ASCE
Ascent in pixels (uint16be). See Font Metrics, for details.
DESC
Descent in pixels (uint16be). See Font Metrics, for details.
CHIX
Character index. The character index begins with a 32-bit big-endian unsigned integer indicating the total size of the section, not including this size value. For each character, there is an instance of the following entry structure: