Font Tables 'name' with attribute unicode: True... Where is this field documented?
Options

MelanieBerkley
Posts: 1
Hiya folks!
I'm looking at the 'name' table for OTF/TTF fonts and I've come across a particular attribute that I can't find any reference to.
Here's an example 'namerecord' (Copyright, Macintosh platform, Roman script, English language)
But what is this
Any help on understanding this attribute would be great, even a lead to more documentation would be fantastic. I'm not sure how I should handle this attribute while programmatically manipulating fonts, and wouldn't want to cause any downstream side effects by incorrectly handling this particular field.
Thanks
Melanie
NOTE: I've used fontools ttx program to pull this attribute out. (https://fonttools.readthedocs.io/en/latest/ttx.html)
I'm looking at the 'name' table for OTF/TTF fonts and I've come across a particular attribute that I can't find any reference to.
Here's an example 'namerecord' (Copyright, Macintosh platform, Roman script, English language)
{'nameID': '0', 'platformID': '1', 'platEncID': '0', 'langID': '0x0', 'unicode': 'True'}
But what is this
'unicode': 'True'
attribute doing there? From what I understand of the specification, Unicode has it's own platform ID (0), so why wouldn't this be used instead of adding an attribute of 'unicode': 'True'
? If this attribute is permitted here, what is it's function, exactly? Furthermore, I can't find any reference to this additional attribute in either Microsoft nor Apple specification references. Any help on understanding this attribute would be great, even a lead to more documentation would be fantastic. I'm not sure how I should handle this attribute while programmatically manipulating fonts, and wouldn't want to cause any downstream side effects by incorrectly handling this particular field.
Thanks

Melanie
NOTE: I've used fontools ttx program to pull this attribute out. (https://fonttools.readthedocs.io/en/latest/ttx.html)
Reference documentation:
0
Comments
-
I think the unicode=True attribute is just a hint for the ttx compiler that the input file (the ttx file itself) is in Unicode encoding.1
-
To add to that: The information in the name entry is stored in binary in the font, so its meaning is interpreted by applying an encoding to it. The byte 01010010 can have different meaning depending on what encoding you use to decode it. If the name is not encoded in unicode encoding internally, it is assumed that it is encoded in the specific platform's encoding. See for example this comment in the fonttools source code for the name table. So this is, like you suspected, a ttx specific attribute, not opentype specific information.
0 -
MelanieBerkley said:
Here's an example 'namerecord' (Copyright, Macintosh platform, Roman script, English language){'nameID': '0', 'platformID': '1', 'platEncID': '0', 'langID': '0x0', 'unicode': 'True'}
A name record, as stored in the font file, has six fields:
* platformID
* encodingID
* languageID
* nameID
* length
* offset
Evidently the information shown above is reported by some tool or utility. You should consult with the maker of that software to find out the intent.
In that example, the platformID is 1, which is the "Macintosh" platform; and the (platform-specific) encodingID is 0, which for the Macintosh platform means "Roman" — i.e., the legacy MacRoman encoding. It's possible a tool is extracting names from the font and outputting them in Unicode encoding. But the string data stored in the font would not be encoded in Unicode.0
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 476 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 831 Font Technology
- 29 Punchcutting
- 508 Typography
- 120 Type Education
- 313 Type History
- 75 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 533 Announcements
- 86 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports