The 'name'
table
General table information
The name table (tag name: 'name'
) allows you to include human-readable names for features and settings, copyright notices, font names, style names, and other information related to your font. These name character strings containing font-related information can be provided in any language. Entries in the name table are referenced by other TrueType font tables and can be used by applications and utilities to provide useful information to the user. Name table entries can be added by the font designer in any language at any time to provide information to world-wide users of the font.
The name table is the vehicle by which you convey information about your font to applications and users. You should assume that your font may be used in virtually every part of the globe. As a result, your font should be localized for other languages and cultural environments. This allows your font to be used by many users around the world. For more information concerning localization and Worldwide software, see the Guide to Macintosh Software Localization, available from Addison-Wesley (ISBN 0-201-60856-1).
The information included for each name record in the name table follows:
- Platform identifier code (
platformID
) - Specific identifier code (
platformSpecificID
) - Language identifier code (
languageID
) - Name identifier code (
nameID
) - Name information multi-lingual character strings
The platform identifier code designates the computer on which the font is to be used. The specific identifier code designates the script system supported. The language identifier code is the language of the text used in the name fields. The name identifier code is a single word or number descriptor. The name information character strings provide information associated with the font. The name strings are raw character string data. The character set encoding used for the raw name data is determined by the platform and specific identifier codes. For example, if the platform identifier is for the MacOS and the specific identifier is Roman, then the raw string data is MacRoman. If the platform identifier is Unicode, then the raw string data is Unicode text in the UTF-16 encoding format. The character strings can thus be localized to any language and script.
Name Table Format
The name table header gives the format of the table, the number of name records (rows) in the table, and the offset in bytes to the multilingual character name strings. The format of the name table header is as follows:
Type
|
Name
|
Description
|
---|---|---|
UInt16 | format | Format selector. Set to 0. |
UInt16 | count | The number of nameRecords in this name table. |
UInt16 | stringOffset | Offset in bytes to the beginning of the name character strings. |
NameRecord | nameRecord[count] | The name records array. |
variable | name | character strings The character strings of the names. Note that these are not necessarily ASCII! |
The name records array follows the name table header. Six entries are provided for each name record. Here is the format of a NameRecord
:
Type
|
Name
|
Description
|
---|---|---|
UInt16 | platformID | Platform identifier code. |
UInt16 | platformSpecificID | Platform-specific encoding identifier. |
UInt16 | languageID | Language identifier. |
UInt16 | nameID | Name identifiers. |
UInt16 | length | Name string length in bytes. |
UInt16 | offset | Name string offset in bytes from stringOffset. |
The platform identifier
The supported platform identifier (platformID
) codes are given in the following table. PlatformID codes have been assigned for Unicode, Macintosh, and Microsoft. PlatformID codes 240 through 255 have been reserved for user-defined platforms and are not available for registration. Names with platformID
s other than 0, 1, and 2 are ignored on OS X and iOS.
Platform ID
|
Platform
|
Platform-specific ID
|
---|---|---|
0 | Unicode | Indicates Unicode version. |
1 | Macintosh | QuickDraw Script Manager code. |
2 | (reserved; do not use) | |
3 | Microsoft | Microsoft encoding. |
The platform ID 2 was originally to use with ISO/IEC 10646, but that use is now deprecated, as ISO/IEC 10646 and Unicode have identical character code assignments.
The platform-specific ID
To fully specify an encoding, it is necessary to state not only the platform identifier code, platformID
, but also the platform-specific encoding, platformSpecificID
, among all of the possible encodings for the specified platform. The Macintosh script manager codes (platformID
= 1 for Macintosh) are given in the following table.
Platform-
specific ID code |
Script
|
Platform-
specific ID code |
Script
|
---|---|---|---|
0 | Roman | 17 | Malayalam |
1 | Japanese | 18 | Sinhalese |
2 | Traditional Chinese | 19 | Burmese |
3 | Korean | 20 | Khmer |
4 | Arabic | 21 | Thai |
5 | Hebrew | 22 | Laotian |
6 | Greek | 23 | Georgian |
7 | Russian | 24 | Armenian |
8 | RSymbol | 25 | Simplified Chinese |
9 | Devanagari | 26 | Tibetan |
10 | Gurmukhi | 27 | Mongolian |
11 | Gujarati | 28 | Geez |
12 | Oriya | 29 | Slavic |
13 | Bengali | 30 | Vietnamese |
14 | Tamil | 31 | Sindhi |
15 | Telugu | 32 | (Uninterpreted) |
16 | Kannada |
The Unicode platform-specific codes are as follows:
Platform-
specific ID code |
Meaning
|
---|---|
0 | Default semantics |
1 | Version 1.1 semantics |
2 | ISO 10646 1993 semantics (deprecated) |
3 | Unicode 2.0 or later semantics (BMP only) |
4 | Unicode 2.0 or later semantics (non-BMP characters allowed) |
5 | Unicode Variation Sequences |
6 | Full Unicode coverage (used with type 13.0 cmaps by OpenType) |
The preferred platform-specific code for Unicode would be 3 or 4. The main distinction between Unicode 1.1 and later versions (most notably 3.0) is that there is a block of some 6600 precomposed Hangul syllables in Unicode 1.1 starting at U+3400
that was removed in Unicode 2.0 and replaced by a block of ideographs in Unicode 3.0. Use of the platform-specific code 1 for Unicode implies that characters from U+3400
through U+4DFF
are to be interpreted as Hangul syllables. Because ISO/IEC 10646 is code-point identical with the Unicode Standard and any valid text encoded in 10646 is also valid as Unicode, there is no need to use the platform-specific code of 2 for Unicode text, and its use is now deprecated.
The Unicode platform-specific code 0 is defined by OpenType to mean specifically Unicode 1.0 semantics.
The Unicode platform-specific code 5 not used by the 'name'
table. It is used only in the 'cmap'
table.
All Unicode-based names must be in UTF-16 (two-byte encoding). UTF-8 and UTF-32 (one- and four-byte encodings) are not allowed.
For information on Microsoft platform-specific encoding identifiers, consult Microsoft.
The language identifier
The language identifier (languageID
) code uniquely defines the language in which the name character string is written for the name record.
For names with a Unicode platformID
, the language code is used only if the font also has an 'ltag'
table and should be 0 or 0xFFFF
otherwise.
If the font does have an 'ltag'
table, a language code of 0xFFFF
is used if the name is language independent and an index into the 'ltag'
table otherwise. See the documentation for the 'ltag'
table for details.
If a name has a Macintosh platformID
, the language code is interpreted as follows:
Language
ID code |
Language
|
Language
ID code |
Language
|
0 | English | 59 | Pashto |
1 | French | 60 | Kurdish |
2 | German | 61 | Kashmiri |
3 | Italian | 62 | Sindhi |
4 | Dutch | 63 | Tibetan |
5 | Swedish | 64 | Nepali |
6 | Spanish | 65 | Sanskrit |
7 | Danish | 66 | Marathi |
8 | Portuguese | 67 | Bengali |
9 | Norwegian | 68 | Assamese |
10 | Hebrew | 69 | Gujarati |
11 | Japanese | 70 | Punjabi |
12 | Arabic | 71 | Oriya |
13 | Finnish | 72 | Malayalam |
14 | Greek | 73 | Kannada |
15 | Icelandic | 74 | Tamil |
16 | Maltese | 75 | Telugu |
17 | Turkish | 76 | Sinhalese |
18 | Croatian | 77 | Burmese |
19 | Chinese (traditional) | 78 | Khmer |
20 | Urdu | 79 | Lao |
21 | Hindi | 80 | Vietnamese |
22 | Thai | 81 | Indonesian |
23 | Korean | 82 | Tagalog |
24 | Lithuanian | 83 | Malay (Roman script) |
25 | Polish | 84 | Malay (Arabic script) |
26 | Hungarian | 85 | Amharic |
27 | Estonian | 86 | Tigrinya |
28 | Latvian | 87 | Galla |
29 | Sami | 88 | Somali |
30 | Faroese | 89 | Swahili |
31 | Farsi/Persian | 90 | Kinyarwanda/Ruanda |
32 | Russian | 91 | Rundi |
33 | Chinese (simplified) | 92 | Nyanja/Chewa |
34 | Flemish | 93 | Malagasy |
35 | Irish Gaelic | 94 | Esperanto |
36 | Albanian | 128 | Welsh |
37 | Romanian | 129 | Basque |
38 | Czech | 130 | Catalan |
39 | Slovak | 131 | Latin |
40 | Slovenian | 132 | Quechua |
41 | Yiddish | 133 | Guarani |
42 | Serbian | 134 | Aymara |
43 | Macedonian | 135 | Tatar |
44 | Bulgarian | 136 | Uighur |
45 | Ukrainian | 137 | Dzongkha |
46 | Byelorussian | 138 | Javanese (Roman script) |
47 | Uzbek | 139 | Sundanese (Roman script) |
48 | Kazakh | 140 | Galician |
49 | Azerbaijani (Cyrillic script) | 141 | Afrikaans |
50 | Azerbaijani (Arabic script) | 142 | Breton |
51 | Armenian | 143 | Inuktitut |
52 | Georgian | 144 | Scottish Gaelic |
53 | Moldavian | 145 | Manx Gaelic |
54 | Kirghiz | 146 | Irish Gaelic (with dot above) |
55 | Tajiki | 147 | Tongan |
56 | Turkmen | 148 | Greek (polytonic) |
57 | Mongolian (Mongolian script) | 149 | Greenlandic |
58 | Mongolian (Cyrillic script) | 150 | Azerbaijani (Roman script) |
The name identifier (nameID
) codes provide a single word or number description relating to the name character string. Codes 0 through 19 are predefined. Codes 20 through 255 are reserved. Codes 256 through 32767 are reserved for font-specific names for variations, layout features and settings, and track names. The predefined name identifier codes are given in the following table:
NameID code(s)
|
Description
|
---|---|
0 | Copyright notice. |
1 | Font Family. |
2 | Font Subfamily. |
3 | Unique subfamily identification. |
4 | Full name of the font. |
5 | Version of the name table. |
6 | PostScript name of the font. All PostScript names in a font must be identical. They may not be longer than 63 characters and the characters used are restricted to the set of printable ASCII characters (U+0021 through U+007E), less the ten characters '[', ']', '(', ')', '{', '}', '<', '>', '/', and '%'. |
7 | Trademark notice. |
8 | Manufacturer name. |
9 | Designer; name of the designer of the typeface. |
10 | Description; description of the typeface. Can contain revision information, usage recommendations, history, features, and so on. |
11 | URL of the font vendor (with procotol, e.g., http://, ftp://). If a unique serial number is embedded in the URL, it can be used to register the font. |
12 | URL of the font designer (with protocol, e.g., http://, ftp://) |
13 | License description; description of how the font may be legally used, or different example scenarios for licensed use. This field should be written in plain language, not legalese. |
14 | License information URL, where additional licensing information can be found. |
15 | Reserved |
16 | Preferred Family. In Windows, the Family name is displayed in the font menu, and the Subfamily name is presented as the Style name. For historical reasons, font families have contained a maximum of four styles, but font designers may group more than four fonts to a single family. The Preferred Family and Preferred Subfamily IDs allow font designers to include the preferred family/subfamily groupings. These IDs are only present if they are different from IDs 1 and 2. |
17 | Preferred Subfamily. In Windows, the Family name is displayed in the font menu, and the Subfamily name is presented as the Style name. For historical reasons, font families have contained a maximum of four styles, but font designers may group more than four fonts to a single family. The Preferred Family and Preferred Subfamily IDs allow font designers to include the preferred family/subfamily groupings. These IDs are only present if they are different from IDs 1 and 2. |
18 | Compatible Full (Macintosh only). In QuickDraw, the menu name for a font is constructed using the FOND resource. This usually matches the Full Name. If you want the name of the font to appear differently than the Full Name, you can insert the Compatible Full Name in ID 18. This name is not used by OS X itself, but may be used by application developers (e.g., Adobe). |
19 | Sample text. This can be the font name, or any other text that the designer thinks is the best sample text to show what the font looks like. |
20–22 | Defined by OpenType. |
23–255 | Reserved for future expansion. |
256 - 32767 | Font-specific names (layout features and settings, variations, track names, etc.) |
The name character strings follow the last name record. Their length and offset location in bytes are defined in their corresponding name record. It is important to remember that each name character string appears in the name table in the format relevant to its specified platform and platform-specific ID. For example, if the platform and platform-specific ID were Unicode 1.1, then the text strings would be encoded according to that standard.
In particular, Unicode names should be in UTF-16 (i.e., two-byte characters). UTF-8 and UTF-32 should not be used. (For more information on Unicode encoding forms, see the Unicode Consortium's UTF-8, UTF-16, UTF-32 & BOM FAQ).
The following example shows how the strings might be used on the Macintosh. The first column has four numbers: the platform, the platform-specific ID (which on the Macintosh is the script), the language, and the name ID code.
1,0,0,0 | "© 1990-91 Apple Computer Inc. ©1981 Linotype AG" | Macintosh platform, Roman script, English language, Copyright notice is "© 1990-91 Apple Computer Inc. ©1981 Linotype AG" |
1,0,0,1 | "Helvetica" | Macintosh platform, Roman script, English language, Family Name is "Helvetica" |
1,0,0,2 | "Bold" | Macintosh platform, Roman script, English language, Style Name is "Bold" |
1,0,0,3 | "Apple Computer Helvetica Semibold" | Macintosh platform, Roman script, English Language, Unique name is "Apple Computer Helvetica Semibold" |
1,0,0,4 | "Helvetica Bold" | Macintosh platform, Roman script, English language, Full name is "Helvetica-Bold" |
1,0,0,5 | "1.0" | Macintosh platform, Roman script, English language, Version is "1.0" |
1,0,0,6 | "Helvetica-Bold" | Macintosh platform, Roman script, English language, PostScript Name is "Helvetica-Bold" |
1,0,0,7 | "Helvetica is a registered trademark of Linotype AG" | Macintosh platform, Roman script, English language, Trademark is "Helvetica is a registered trademark of Linotype AG" |
1,0,1,2 | "Gras" | Macintosh platform, Roman script, French language, Style Name is "Gras" |
1,0,1,4 | "Helvetica Gras" | Macintosh platform, Roman script, French language, Full Name is "Helvetica Gras" |
1,0,1,7 | "Helvetica est une marque déposée de Linotype AG" | Macintosh platform, Roman script, French language, Trademark is "Helvetica est une marque déposée de Linotype AG" |
Platform-specific Information
It is recommended that all fonts for use on OS X have PostScript names with the Macintosh platform and MacRoman platform-specific ID.
If two fonts are installed with the same PostScript name, OS X treats them as duplicates and only one will be available for use.
Fonts in font suitcases will have PostScript names in the 'FOND'
resources. These should match the PostScript names in the corresponding 'sfnt'
resources' 'name'
tables. For legacy reasons, 'FOND'
PostScript names are preferred and may override the 'name'
table PostScript names.
When fonts are grouped into families by the Font Palette or Font Book on OS X, the Preferred Family and Preferred Style Names will be used if present.
Dependencies
The 'name'
table itself does not depend on other tables in the font. However, other tables (such as the 'feat'
(feature name) table or the 'fvar'
(font variations) table) contain name identifiers which are to be used for UI elements providing control of font features or variations. Any name identifier found in one of these other tables must have at least one instance in the 'name'
table.