'head' table contains global information about the font. It records such facts as the font version number, the creation and modification dates, revision number and basic typographic data that applies to the font as a whole. This includes a specification of the font bounding box, the direction in which the font's glyphs are most likely to be written and other information about the placement of glyphs in the em square. The checksum is used to verify the integrity of the data in the font. It can also be used to distinguish between two similar fonts.
The flags give global information about the font. If bit 0 is set to one, the baselines for the font is at y= 0 (that is, the x-axis). If bit 1 is set to one, the x-position of the leftmost black bit is assumed to be the left side bearing. If bit 2 is set to one, instructions may use point size explicitly in place of pixels per em. This means that scaling a 12 point screen font to obtain the equivalent printer font may not produce the identical result as requesting a 12 point printer font. Setting bit 3 causes the use of integer scaling instead of fractional scaling. Setting bit 4 allows fonts to alter device dependent widths.
The values xMin, yMin, xMax and yMax must be computed by looking at the outline data for the glyphs in the font. Together they specify a rectangle that constitute a bounding box for all of the (ungridfitted) glyphs in the font.
The number of units per em for the font is set in this table. This value should be a power of 2. Its range is from 64 through 16384.
This value lowestRecPPEM is the smallest readable size in pixels per em for this font.
The fontDirectionHint provides information about the way in which the glyphs in this font are likely to be set. A value of 0 indicates a mixed directional font; a value of one indicates only left to right glyphs, -1 only right to left glyphs. The values 2 and -2 refer to fonts which contain some neutral glyphs, that is glyphs without a strong directionality.
A neutral character has no inherent directionality. (It is not a character with zero width). Spaces and punctuation are examples of neutral characters. Non-neutral characters are those with inherent directionality. For example Roman letters (left-to-right) and Arabic letters (right-to-left) have directionality. In a Roman font where spaces and punctuation are present, the font direction hint should be set to 2.
The indexToLocFormat value indicates the type of offset format used in the index to loc (
Table 22 :
|Fixed||version||0x00010000 if (version 1.0)|
|Fixed||fontRevision||set by font manufacturer|
|uint32||checkSumAdjustment||To compute: set it to 0, calculate the checksum for the
|uint32||magicNumber||set to 0x5F0F3CF5|
|uint16||flags||bit 0 - y value of 0 specifies baseline
bit 1 - x position of left most black bit is LSB
bit 2 - scaled point size and actual point size will differ (i.e. 24 point glyph differs from 12 point glyph scaled by factor of 2)
bit 3 - use integer scaling instead of fractional
bit 4 - (used by the Microsoft implementation of the TrueType scaler)
bit 5 - This bit should be set in fonts that are intended to e laid out vertically, and in which the glyphs have been drawn such that an x-coordinate of 0 corresponds to the desired vertical baseline.
bit 6 - This bit must be set to zero.
bit 7 - This bit should be set if the font requires layout for correct linguistic rendering (e.g. Arabic fonts).
bit 8 - This bit should be set for a GX font which has one or more metamorphosis effects designated as happening by default.
bit 9 - This bit should be set if the font contains any strong right-to-left glyphs.
bit 10 - This bit should be set if the font contains Indic-style rearrangement effects.
bits 11-12 - Defined by Adobe.
|uint16||unitsPerEm||range from 64 to 16384|
|FWord||xMin||for all glyph bounding boxes|
|FWord||yMin||for all glyph bounding boxes|
|FWord||xMax||for all glyph bounding boxes|
|FWord||yMax||for all glyph bounding boxes|
|uint16||macStyle||bit 0 bold
bit 1 italic
bit 2 underline
bit 3 outline
bit 4 shadow
bit 5 condensed (narrow)
bit 6 extended
|uint16||lowestRecPPEM||smallest readable size in pixels|
|int16||fontDirectionHint||0 Mixed directional glyphs
1 Only strongly left to right glyphs
2 Like 1 but also contains neutrals
-1 Only strongly right to left glyphs
-2 Like -1 but also contains neutrals
|int16||indexToLocFormat||0 for short offsets, 1 for long|
|int16||glyphDataFormat||0 for current format|
Although it is officially listed as a "required" TrueType table, it is not in fact required for all sfnt-housed fonts on the Mac OS. Indeed, it isn't even required by all TrueType fonts.
Non-TrueType fonts housed in an sfnt file may not have a
'head' table. This is allowed by the OFA2 architecture.
TrueType fonts which have no outline data but consist of bitmaps only should not have a
'head' table. They should use the byte-by-byte identical
'bhed' table instead. The Mac OS uses the presence of a
'bhed' to signal the fact that a font has no outlines.
Although they consist of bitmaps only, Newton fonts are required to have the
Many of the fields in the
'head' tabl e are closely related to the values in other tables. For example, the unitsPerEm field is fundamental to all tables which deal with curves or metrics. This table is used throughout the TrueType rendering engine as a short-cut to determine various key aspects of the font.
Inasmuch as any change to any other table will have an impact on the checkSumAdjustment and modified fields of the
'head' table, it is always wisest to update the 'head' table after any font editing operation.
Editing of the
'head' table is possible using TrueEdit. Other tools will automatically update fields in the
'head' table as needed, most notably the checkSumAdjustment.
[Table of Contents]