Long font names

ValKalinicValKalinic Posts: 45
edited March 4 in Font Technology
Hi all,
I'm thinking about naming a family I'm finishing up, and have some concerns over the name length. I've read once in an unrelated thread here that a name should "ideally" be shorter than 31 characters.
  • Why is that and what does "ideally" mean in this context? 
  • Does such a length include style names and spaces? If a style is named "Extra Light Oblique" for example, that part alone is 19 characters, leaving only 12 more. If we suppose a family name can begin with two letters of a foundry flag and a space, only 9 characters for a name are left. 
  • Another example, "XX_FONTNAME_Standard_Extra_Light_Oblique" can't work and exceeds that limit, even if the foundry flag is removed. Sure, it is an extreme example but it could happen you need all these descriptors of a style, if there are: name + stencil/standard + weights + normal/oblique.
Am I missing anything, are there other restrictions on a name? Thank you!

Comments

  • Thomas PhinneyThomas Phinney Posts: 1,875
    edited March 4
    There are a ton of different name fields in an OpenType font. So ... I don’t know which one you mean when you write about a length limit for “a name.”

    Here are three four common sets of fields, and their different requirements.

    The PostScript FontName (name ID 6) has a hard limit of 29 characters. There used to be suggestions of limiting it to 27, which only matters if you keep the file name the same as the FontName, and you want the file name to work on really old operating systems. This name can't have spaces, and does include the style, so it often makes heavy use of abbreviations. Few apps use this to display the name in menus, although it does show up in various places, such as the missing font dialog in Adobe apps.

    Last time I checked, on at least some still-common versions of MS Office apps, name ID 1 & 2 (family and subfamily/style) had a limit of 31 characters each. But this keeps the family and style names separate, so the descriptions in the question don’t apply.

    Name IDs 16 and 17 are recommended for family and subfamily/style for newer apps, and have a limit of 63 characters each.

    Name IDs 21 and 22 are family and subfamily/style for apps/platforms that want all styles to be differentiated by weight/width/slope (WWS). I'm not recalling the limit here, but I would be surprised if it was less than 63 characters.
  • ValKalinicValKalinic Posts: 45
    Very helpful @Thomas Phinney, thank you very much for your time and insight. I'll look into these more.
  • Belleve InvisBelleve Invis Posts: 269
    Last time I checked, on at least some still-common versions of MS Office apps, name ID 1 & 2 (family and subfamily/style) had a limit of 31 characters each. But this keeps the family and style names separate, so the descriptions in the question don’t apply.
    Actually any GDI-accessible names are limited to 31 characters, because of this:
    typedef struct {
            lfHeight;
            lfWidth;
            lfEscapement;
            lfOrientation;
            lfWeight;
      BYTE  lfItalic;
      BYTE  lfUnderline;
      BYTE  lfStrikeOut;
      BYTE  lfCharSet;
      BYTE  lfOutPrecision;
      BYTE  lfClipPrecision;
      BYTE  lfQuality;
      BYTE  lfPitchAndFamily;
      WCHAR lfFaceName[LF_FACESIZE];
    } LOGFONTW;
    `LF_FACESIZE` is a macro and is defined as 32.
Sign In or Register to comment.