head: Font Header
This table gives global information about the font.
Requirements
- The xMin, xMax, yMin, and yMax fields must be the actual max/min of all glyph bounding boxes. Glyphs with no contours should be ignored for the purposes of these calculations.
- Bit 0 of the flags field (baseline for font at y=0) should be set. Fonts should be designed so that this condition is true.
- Bit 3 of the flags field (force ppem to integer values) should be set.
- The macStyle field should agree with the fsSelection field in the 'OS/2' table.
- The fontDirectionHint field should be 2 (strongly left-to-right, with neutrals) for a Far East font.
Recommendations
- The fontRevision field is intended for font manufacturers to indicate the revision number of font software. All other version numbers in a TTF refer to versions of the TrueType specification or the particular table specification, and an inappropriate value in a version field may produce unpredictable results.
- The font should be designed so that unitsPerEm is a power of 2; this can greatly increase the speed of scaler math. In choosing the font's design resolution, also consider size versus quality tradeoffs; with a smaller unitsPerEm (512 or 256), point coordinate deltas in the 'glyf' table typically occupy one byte instead of 2, greatly reducing overall font size.
- Bit 1 of the flags field (left sidebearing at x=0) should be set if this condition is true for all glyphs.
- Bit 4 of the flags field (instructions may alter advance width) should be set if the font is "non-linear". This may occur if advance widths are changed by TrueType instructions, or if embedded bitmaps have advances that don't match the value obtained by linearly scaling 'hmtx' data.
- Far East fonts will almost certainly have a large 'glyf' table, which means indexToLocFormat should be 1 (long offsets).