Fonts
Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Support

Return to Index

Character Code/Glyph Mapping Requirements and Recommendations

The following is a list of required characteristics for glyphs and their corresponding character codes in Apple TrueType fonts.

  1. The first glyph (glyph index 0) must be the MISSING CHARACTER GLYPH. This glyph must have a visible appearance and non-zero advance width.
  2. The second glyph (glyph index 1) must be the NULL glyph. This glyph must have no contours and zero advance width.
  3. All characters in the appropriate Macintosh character set(s) must be present in fonts to be used with proper Macintosh applications. Certain specified characters, however, are mapped to the MISSING CHARACTER GLYPH as stated below. This is not true for Unicode; there is no requirement for Unicode coverage except that it should at least be the complete set of Unicode equivalents of characters in at least one Macintosh character set.
  4. If a font has multiple cmaps, then corresponding characters in the respective character sets should be mapped to the same glyphs.
  5. The following character codes must be mapped to the first glyph (glyph index 0, MISSING CHARACTER GLYPH):
    1. 0x0001 START OF HEADING
    2. 0x0002 START OF TEXT
    3. 0x0003 END OF TEXT
    4. 0x0004 END OF TRANSMISSION
    5. 0x0005 ENQUIRY
    6. 0x0006 ACKNOWLEDGE
    7. 0x0007 BELL
    8. 0x000A LINE FEED
    9. 0x000B VERTICAL TABULATION
    10. 0x000C FORM FEED
    11. 0x000E SHIFT OUT
    12. 0x000F SHIFT IN
    13. 0x0010 DATA LINK ESCAPE
    14. 0x0011 DEVICE CONTROL 1 (X-On)
    15. 0x0012 DEVICE CONTROL 2
    16. 0x0013 DEVICE CONTROL 3 (X-Off)
    17. 0x0014 DEVICE CONTROL 4
    18. 0x0015 NEGATIVE ACKNOWLEDGE
    19. 0x0016 SYNCHRONOUS IDLE
    20. 0x0017 END OF TRANSMISSION BLOCK
    21. 0x0018 CANCEL
    22. 0x0019 END OF MEDIUM
    23. 0x001A SUBSTITUTE
    24. 0x001B ESCAPE
    25. 0x001C FILE SEPARATOR
    26. 0x001E RECORD SEPARATOR
    27. 0x001F UNIT SEPARATOR
    28. 0x007F DELETE
  6. The following characters must map to the second glyph (glyph index 1, the NULL glyph):
    1. 0x0000 NULL
    2. 0x0008 BACKSPACE
    3. 0x000D CARRIAGE RETURN (in a right-to-left font)
    4. 0x001D GROUP SEPARATOR
  7. Each of the following characters must map to a glyph with no contours and positive advance width:
    1. 0x0009 HORIZONTAL TABULATION
    2. 0x000D CARRIAGE RETURN (in a left-to-right font)
    3. 0x0020 SPACE
    4. 0x00A0 NO-BREAK SPACE
  8. The following groups of characters must have the same width
    1. 0x0009 (HORIZONTAL TABULATION) and 0x0020 (SPACE)

The following list of recommendations are for the glyphs mapped to the character codes stated. They are intended to aid in line layout

  1. Lining numbers should be monospaced. These include 0x0030 through 0x0039 (digits zero through nine) and 0x00CA (Unicode U+2007) FIGURE SPACE. Old-style figures need not be monospaced.
  2. In cursive fonts, glyphs should overlap to allow glyphs to join together in device-independent text. a 5% overlap is recommended.
  3. White space should be evenly distributed between the left- and right-side bearings of glyphs. Extra space should be placed on the right if grid-fitting results in an odd number of pixels.



Last updated 17 September 1999. Send comments to applefonts@apple.com.