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)
{'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:
Comments
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.