If you have bad glyph names (geeks even call them ‘illegal’), then your font may not compile correctly. So, make sure your glyph names adhere to the glyph naming convention.
Actually, Glyphs will check what you enter into a glyph’s name field and prevent you from causing trouble in the first place. E.g., if you type in
ä, it should automatically convert to
adieresis. If you still manage to get past that, Glyphs will complain:
Still, if you open a font that was created in another software that does not check glyph names, you may still end up with illegal names in your Glyphs file. If that happens, then this blog post is for you.
Glyphs follows its own naming convention, especially in non-Latin scripts like Cyrillic or Arabic. We refer to it as nice names. That’s because we do believe that
Zhe-cy are more descriptive than
uni0416. Take a look Window > Glyph Info for a list of descriptive glyph names.
As you can see, there is a Add to Font button. Of course you can select more at once, simply by pressing Shift while clicking to select successively, or by pressing Cmd while clicking to select individual glyphs.
Updating Glyph Info
A good first step to fix glyph name problems is Font > Update Glyph Info. This will try and synchronize Unicode values and glyph names. Glyph names are reset to their defaults as described in the built-in glyph database (see below). However, if you are employing custom glyph data, it will be respected in the name conversion.
There are two settings you may want to check if you are importing an existing font: firstly, the global preference Glyphs > Preferences > User Settings > Keep glyph names form imported files. If this is on, newly imported files will automatically activate the font-specific File > Font Info > Other Settings > Use custom naming. When these settings are on, conversion to nice naming is prevented. This can be useful if you need to integrate with a different, prescribed workflow.
Sometimes, you want your glyph to correspond to a certain Unicode character for which there is no entry in the Glyph Info. A typical example will be a character in the Private Use Area (PUA). In this case, you start your glyph name with
uni, followed by the hex code (with uppercase letters), e.g.
uniE000. By the way, once the Unicode value is set, you can rename it to whatever you like and makes sense to you, e.g.,
twitterIcon. The PUA Unicode value will be kept with the new name.
For glyphs that correspond to Unicodes outside the Basic Multilingual Plane (BMP), the name starts with a
u, followed by the 5-digit code. For instance, the glyph for
U+10102 AEGEAN CHECK MARK would be called
Roll Your Own
If, however, you have to make up your own glyph names, it is a very good idea to stick to the following naming scheme. The first character in any name for an exporting glyph should always be one of these:
That’s it. If your first character does not appear up there, your glyph name is most likely illegal and the font police will come, lock you up and, even worse, prevent your font from compiling correctly.
There are two exceptions, though. Firstly, invisible (non-exporting) glyphs may employ an underscore at the beginning of the name. See below for more details. Secondly, there’s
.notdef, a replacement glyph for undefined characters in text. Often it’s a square shape with an X in it, or a questionmark, or, if you didn’t design a
.notdef, this will be picked by default:
So, read my lips: no umlauts, no accents, no funky Hangul sign, just plain ASCII letters. That’s letters, so no figures either. And especially no space, no comma, no dash or any other punctuation. Just plain old A to Z or a to z.
For the rest of the glyph name, you can also use one of these:
1234567890 (figures) _ (underscore) . (period) - (dash)
That’s it. Again, no space, no accents, no fancy-schmancy anything. But behold, some of these have a special meaning.
The underscore (_) is used for ligatures. The underscore connects the names of the glyphs that are connected by the ligature. So, the parts between the underscores should, again, be valid glyph names as they appear in the Glyph Info palette.
Sounds complicated, I know, but it’s easy. Imagine you have a ligature of
h, then your ligature is called
f_h. Want a ligature of
adieresis (ä)? Then your ligature is called, you guessed it,
f_adieresis. Wanna put your name in as a ligature? Make that
P_e_t_e_r or whatever your name is. If you stick to this convention, Glyphs can even build the respective ligature features for you.
Since the automatic feature generation places most ligatures into
dlig (discretionary ligatures), you can use the
.liga extension to force your ligature into
liga (standard ligatures) instead, e.g.
f_adieresis.liga. Read more about it in the ligatures tutorial.
Glyphs with an underscore at the beginning of their names are non-exporting by default, when generated via Glyph > Add Glyphs (Shift-Cmd-G). So, an underscore as the first character in a glyph name is used for some special glyphs, such as smart glyphs, corner components, special component tricks, and the like.
The period (.) is used to add a descriptive extension to the glyph name. In many cases, this will be the name of the OpenType feature in which the glyph is supposed to appear, e.g.,
e.ss01 for the first stylistic set variation of a lowercase e.
If the part before the period is a valid glyph name from Window > Glyph Info, then Glyphs can make the connection to a character. This means that your font will work better in certain situations such as copying text from a PDF in which your font is used.
Also, you can make a localized version of a glyph with a
.loclXXX extension where XXX is the Language System Tag, e.g.
adieresis.loclSVE for a lowercase Swedish ä or
oacute.loclPLK for a lowercase Polish ó. Glyphs can then take care of the
locl feature automatically.
Occasionally, the relationship between glyph name suffixes and OpenType feature tags is more complex than a straight-forward one-to-one. For instance,
.sc will trigger both small-cap features,
c2sc. And a constellation of three out of the four suffixed
.tf will trigger the appropriate numeral features. For a complete list of OpenType features that can be automated through clever glyph naming, see the appendix of the Glyphs Handbook, which you can download for free from the Get Started page.
Glyphs uses the dash (-) for appending a script system, e.g.
-cy for Cyrillic,
-ar for Arabic,
-deva for Devanagari and so on. My favourite, of course, is
-phaistosDisc, just because. Open your Glyph Info palette and type a dash in the search field to see which scripts there are. You will get the idea.
Update 2012-09-21: Added the paragraph about non-BMP Unicodes.
Update 2015-09-21: Updated for Glyphs 2.
Update 2016-12-06: Updated screenshots, fixed typos, partial rewrite.