glyf: Glyph Data
The 'glyf' table contains the glyph outline and instruction data.
Requirements
- Glyphs 0 and 1 have special definitions. Glyph 0 is the missing character glyph: characters in the 'cmap' table which are not included in the 'glyf' table should point to glyph 0. (The design of glyph 0 is typically an open box: o.) Glyph 1 is the null glyph: it must have no contours and an advance width of 0.
- The order of entries in the 'loca' table must match the order of glyphs in the 'glyf' table.
- GDI is able to distinguish between single-byte (SBCS) and double-byte (DBCS) characters. The narrow (SBCS) forms do not need special treatment or alternate glyphs for vertical writing in the 'glyf' table.
Recommendations
- The glyph order does not need to match the encoding order. For example, the glyphs could be arranged in frequency order or in local code page order to help reduce memory paging.
- Since all glyphs have both horizontal and vertical metrics, the same glyph can be used for both writing directions unless there is a difference in the outline or metrics.
- Fonts should use composites for space savings wherever possible. However, it is important to maintain separate glyphs for separate purposes (such as characters with both SBCS and DBCS versions).