Kerning

  • by Rainer Erich Scheichelbauer
  • Tutorial
  • – Modified on

Manipulating the whitespace enclosed inside a pair of glyphs is called kerning. Kerning is usually something you do very late in the fontmaking process. Try to get as far as possible with properly spacing your glyphs. But you’ll notice that, no matter how well you do it, some letter combinations never really work out properly. This is when you have reached the point at which you will not get around kerning. One of the usual suspects is the combination ‘VA’, i.e. when a capital V is followed by a capital A.

This is important: keep in mind that the term kerning means adjusting the whitespace enclosed by a combination of two letters, a glyph pair. You cannot kern a single letter. Adjusting the left and right sidebearings of a single letter is called spacing.

Shortcuts

Okay, so you have optimized the sidebearings of your V and your A, but there is still too much whitespace in between them. This becomes apparent when you type a word like ‘VAND’, which, I believe, means ‘water’ in Danish and ‘sell’ in Romanian and Moldovan. I recommend you do not merely type the combination that needs adjusting, but also add some context, a few letters where the whitespace seems alright already. This way, you have direct comparison. And in this example, I think the space between N and D is pretty much alright already:

But it looks more like ‘V AND’ instead of ‘VAND’, right? So, if you agree, we need to do something about the space between V and A. In other words, we need to kern ‘VA’.

The easiest way to do so is to move the cursor between V and A, hold down the Ctrl and Opt keys and then adjust the kerning with the left and right arrow keys. Add Shift for increments of 10:

You may have noticed that, except for the additional Opt key, these are the same shortcut as for adjusting the left sidebearing of a letter, Ctrl-arrows or Shift-Ctrl-arrows. Being the logical people that we are, adding the Opt key to the RSB spacing shortcut, Cmd-arrows or Shift-Cmd-arrows, should result in manipulating the kerning to the right of the current letter. It actually does: Cmd-Opt-arrows or Shift-Cmd-Opt-arrows changes the kerning between A and N in our example.

Displaying Kerning Pairs

You can keep track of kerning pairs in the sample text by switching to the Measurement tool (shortcut L). Negative kerning will be shown in light blue, positive kerning in light yellow. Even though it is not necessary for the font in this example, I added positive kerning between N and D, so you can see what it looks like:

Also, in the grey info area (Cmd-Shift-I), you can see the kerning value in relation to the current letter. In this example, the kerning between the letter to the left of A and A itself is –80:

And of course, you can get an overview of all kerning pairs via Window > Kerning:

The kerning pairs are sorted by the left glyph. If you click on a right glyph, Glyphs will display the kerning pair at the current cursor position in the main window. If you have many kerning pairs, you can use the search field to quickly find the one you want. Click on the little triangle in the search field to get extra search options:

Group Kerning

You probably want to Kern ‘VA’ just like ‘VÄ’, ‘VÅ’ and ‘VÀ’. And perhaps even like ‘WA’. In this case, you can put the glyphs into groups and use the kerning not just for the specific glyphs but for whole groups of glyphs. In this case, V and W would form one group, and A, Ä, Å and À would form another group. The name is arbitrary, though. For example, the left kerning group of e, c, o and q can be called o, because they share the same shape. But you could also name it lowercaseRound or something else, as long as it makes sense to you. As opposed to the metrics keys, the kerning group names are not references to glyphs.

So, how do we do that? Easy. Every glyph has two fields labeled ‘Group’ in its info panel (Cmd-Shift-I). Now, this is important: each glyph can belong to one left group and one right group. A good example is the capital Æ: on the left it looks like an A, on the right, it looks like an E. So we put it in the left A group and the right E group:

Now, pay attention to the lock symbols next to the ‘Group’ entries. If the lock is closed, this means that the kerning value applies to the whole group, not just the individual glyph displayed. If the lock is opened, then you have a kerning exception, i.e. the value only applies to that very glyph displayed, not the whole group. In this example, the kerning of A with the glyph to the left is a kerning exception, whereas the kerning of A with the glyph to the right of it applies to all glyphs in the A group:

You can apply kerning groups to multiple glyphs at once. Select more than one in font view (grid or list mode), and manipulate the settings in the bottom left of the window:

In grid mode, you can also invoke the context menu on a multiple glyph selection (right-click or Ctrl-click) and set the kerning groups there:

Of course, it is up to you how you want to sort your glyphs into kerning groups. But there is a very handy script that does a pretty good job of guessing the kerning groups for each side of each of your glyphs. You may need to adjust the results here and there, but it does get you pretty far. You can download the Set Kerning Groups script from Github and put it in the Scripts folder which you can access via Script > Open Scripts Folder (Cmd-Shift-Y). Holding down the Opt key, you can Script > Reload Scripts (Cmd-Opt-Shift-Y), then Set Kerning Groups will be accessible in the Script menu.

Importing Kerning

If you have already set up your own groups in one font, and you want to have the same groups in your frontmost file, then choose File > Import > Metrics and pick the font file you want to copy the kerning groups from. The import function accepts UFO and Glyphs files. In the dialog that appears, pick whether you want to import kerning and/or kerning classes (another word for groups):

The Import Kerning option is only active when you import from .ufo files.

Kerning Window

You can also copy and paste kerning via the kerning window. Just select the kerning pairs you want to copy (or simply select them all with Cmd-A), copy, switch to another font and paste them into the kerning window of that font. Kerning groups are displayed with a preceding at sign (@) and in blue, individual pairs in brown.

Take a look at the gear menu at the bottom right of the kerning window. There are two helpful functions hidden there: Clean up removes leftovers like kerning entries of letters that are not in the font anymore. Compress removes unnecessary kerning exceptions, e.g. the group kerning between the A group and the V group is –80, but you also have an individual ‘ÄV’ kerning pair of –80. Since that kerning exception makes no visible difference, the Compress function deems it unnecessary and will remove it.

SAMPLE FONT: PLAYFAIR DISPLAY, COURTESY OF CLAUS EGGERS SØRENSEN.

2016-02-16: Updated for Glyphs 2 (thanks Sacha Rein!)