Understanding the 'name' table.

Some font makers decide on a naming scheme that ends up with names like "Regular Italic" instead of "Italic".
This is sometimes problematic when working with InDesign character styles where Italic ≠ Regular Italic.
As long as the license allows i'd like to change specific entries in the 'name' table to change "Regular Italic" into "Italic".

What i found out myself:
  • Usually there's a set of entries for Mac and Win separately.
  • nameID 2 is where the font subfamily name is stored, it should only be used for the basic 4 styles: R,B,I,BI
  • for compatibility with software that expects only 4 styles per family name nameIDs 16 and 17 are supposed to be added for extended families
  • fonts sometimes have a nameID 17 just in the Win set and the value is the same as nameID 2 in the Mac set (mac nameID 2 = "Regular Italic", win nameID 2 = "Italic", win nameID 17 = "Regular Italic" and sometimes something is appended to win nameID 1 and it ends up like "FamilyName Regular" while the mac nameID 1 is still just "FamilyName" ), this is what it looks like in my fonts i export with Glyphs
  • i would use fontTools.ttLib to do this
I also read that the nameIDs 16 and 17 are of higher priority. So changing the nameID 16 to my liking or adding it to the table would be safe? What would be the best way to approach this?
Tagged:

Comments

  • Marcin Dybaś
    Marcin Dybaś Posts: 6
    edited October 2018
    TL;DR?

    Q: To successfully change the subfamily name and not break compatibility with Windows apps should i modify the name table entries: nameID 2, 16, 17 or only some of them is enough?
  • Kent Lew
    Kent Lew Posts: 933
    edited October 2018
    I believe you should be able to change just nameID 2 and nameID17. NameID16 should be just the Family Name, which presumably you don’t want/need to change.
    It’s not clear to me whether your objection to the Regular Italic subfamily name in InDesign. Is it because when switching fonts for text which is already styled SomeFont Italic, it doesn’t map to NewFont RegularItalic?
    Or is it because using the keyboard shortcut shift-command-I does not italicize NewFont Regular to NewFont Regular Italic?
    Changing those nameIDs should address the first issue, but it may not address the second, since style-linking happens elsewhere.
  • Thomas Phinney
    Thomas Phinney Posts: 2,863
    edited October 2018
    Kent Lew said:
    I believe you should be able to change just nameID 2 and nameID17. NameID16 should be just the Family Name, which presumably you don’t want/need to change.
    It’s not clear to me whether your objection to the Regular Italic subfamily name in InDesign. Is it because when switching fonts for text which is already styled SomeFont Italic, it doesn’t map to NewFont RegularItalic?
    Or is it because using the keyboard shortcut shift-command-I does not italicize NewFont Regular to NewFont Regular Italic?
    Changing those nameIDs should address the first issue, but it may not address the second, since style-linking happens elsewhere.
    For Adobe InDesign, BOTH these things rely in part on heuristics, beyond just name data matching.

    For the "regular" font in a family in particular, InDesign uses some heavy heuristics to decide which is regular, if there is no font named regular in the family.

    Also, as most here probably know: "Regular Italic" is simply not a valid value for nameID = 2. For nameID = 17, it is a valid value... but might confuse InDesign anyway.

    InDesign's style linking may rely on metadata other what you might expect. The logical thing (in my mind, at least) is to rely on having the same Windows nameID 2, plus style flags. Because this was not seen as reliable enough, at least historically, InDesign did some other things.... Net result is, I would not be shocked if a font with a style name of "Regular Italic" for nameID 17 does not get picked as the italic match for the Regular, by InDesign, even if nameID 2 and style flags are set correctly.

    Fonts. Can’t live with them, can’t live without them....
  • John Hudson
    John Hudson Posts: 3,157
    I believe you should be able to change just nameID 2 and nameID17. NameID16 should be just the Family Name, which presumably you don’t want/need to change.

    In an extended family in which you want all members to share a common family name in modern apps, you might need to set NameID16 for at least some family members that will have different NameID1 for 4-style linking. E.g.

    ID1 = FontBar
    ID2 = Regular

    ID1 = FontBar
    ID2 = Italic

    ID1 = FontBar UltraBlack
    ID2 = Regular
    ID16 = FontBar
    ID17 = UltraBlack

    ID1 = FontBar UltraBlack
    ID2 = Italic
    ID16 = FontBar
    ID17 = UltraBlack Italic
  • Kent Lew
    Kent Lew Posts: 933
    InDesign. Can’t work with it, can’t work without it . . .