Changing the whitespace enclosed inside a pair of glyphs is called kerning. Here’s how to do it in Glyphs, with lots of good tips to make your task easy.
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 without 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.
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. (Actually, the latter is spelled ‘vând’ with a circumflex, or so I have been told by a trusted source.) 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. And 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:
In fact, you will see small stubs of these colors in Text tool (shortcut T) as well. Just make sure View > Show Metrics (Shift-Cmd-M) is on, and you are zoomed in enough:
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 V and the A is –80:
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.
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 lowercase æ: 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:
The group names are arbitrary, though. For example, the left kerning groups of e, c, o and q can be called
o, because they share the same shape. But you could also name them
lowercaseRound or something else, as long as it makes sense to you. Unlike metrics keys (see the Spacing tutorial), the kerning group names are not references to glyphs.
Now, pay attention to the lock symbols next to the kerning entries:
- If the lock is closed, you have group kerning. This means that the kerning value applies to the whole group, not just the individual glyph displayed.
- If the lock is open, 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 ae with the glyph to the left (v) is a kerning exception, whereas the kerning of ae with the glyph to the right (w) applies to all glyphs in the right e group:
That means that the -15 kerning of ‘væ’ applies to all the glyphs of the right v group, but only to the æ, and no other glyphs of the left a group, i.e., not to ‘va’ or ‘vä’ or ‘và’, etc. Personally I would not recommend an exception here, so I would close that lock again.
The kern pair ‘æw’, with a value of -10, applies to all the glyphs of the right e group and the left w group. So the kerning value also applies to the pairs such as ew, èw, éẃ, ëẅ, ẽẁ, œw, etc. You get the idea.
A good way to manage your groups is to switch Font view (Cmd-Opt-1) into List mode with this button in the top left corner of the window:
Then you can manage the data of your glyphs like in a spreadsheet:
Press Tab to move to the next field, Shift-Tab for the previous field. Press the Return key to go to the next line. Click on column headers for sorting, click again for reversing the sort order. Right-click on column headers to customize the columns.
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:
When you do group kerning, activate View > Show Group Members and Glyphs will display all group members for the current letter pair superimposed on top of each other. Sounds complicated, but one screenshot explains it all at one glance:
You can see all members of the respective kern group, including all diacritics. This makes it much easier to spot possible collisions. And you know when to introduce an exception.
Okay, so we established what an exception is. It is when at least one of the two locks is open. So there are three types of kerning exception:
- group-to-glyph: left lock is closed, the right lock is open. All the glyphs in the group on the left kern with that single glyph on the right.
- glyph-to-group: left lock is open, the right lock is closed. The single glyph on the left kerns with all the glyphs in the group on the right.
- glyph-to-glyph: both locks are open. The single glyph on the left kerns with the single glyph on the right.
All nice and fine, but when do I need to open which lock? Easy. You will open the lock on the side of the exception. I’ll give you a good example. Say you have kerned ‘Yo’ by -70 units. Like this:
Of course, the locks are closed, because you want to take advantage of group kerning. After all ‘Yø’ and ‘Yó’ look just fine, just like ‘Ýo’ and ‘Ỳç’, and all other combinations of Y diacritics with a lowercase round letter. And then you check all the diacritic combinations, and you run into this:
The dieresis mark of the ö is getting too close to the Y. You cannot just change the group kerning, because that would create a gap for the original ‘Yo’ pair. So, you open the lock of the odieresis, hold down Ctrl-Opt-Shift and press the right arrow repeatedly, and thus create a group-to-glyph exception:
All the other letters in the o group remain group-kerned. Just the odieresis has an individual exception. Uppercase letter with lowercase diacritic is the most frequent scenario for exceptions in Latin. So, group-to-glyph kerning happens often.
Occasionally you will also have glyph-to-group situations, e.g. when the Q and the O share the same right group. Typically the Q will have many more collisions on its right, for example in the pair ‘Qp’. Then you would open the left lock (the lock for the right side of the Q), and add positive kerning.
In Latin and similar simple scripts, it is rather rare that you will get to open both locks. But it happens too, especially for narrow diacritics. The dreaded combination ‘ïï’ (double i dieresis) counts among these situations.
Since you will end up with a couple of hundred, potentially even more than a thousand pairs of kerning, it is a good way to approach kerning methodically. Different designers will advise different methods, of course. But most will roughly agree on this:
- Group kerning
- Set the kerning groups.
- Go through combinations of right groups with left groups, make sure you keep the locks closed. When doing so, group your glyphs, decide which group pairings make sense, for example:
- Lowercase to lowercase
- Uppercase to lowercase
- Uppercase to uppercase
- Punctuation around letters
- Punctuation around (proportional) figures
- Punctuation to punctuation
- Do not overkern: keep an unkerned pair (like ‘nn’ or ‘HH’) around for reference.
- Avoid kerning for certain glyphs altogether, e.g., tabular figures.
- Find pairs with collisions or close encounters, open the lock where it most makes sense (left, right or both), and add positive kerning.
- Find pairs with gaps, open the lock where it most makes sense, and add negative kerning.
- Avoid overkerns.
Decide what your minimum kerning is, and what your increment is. Usually it makes sense to space as precisely as possible, but kern only roughly. If you feel you need to have many very small kerning pairs (less than 10 units), consider revisiting your spacing.
Once you get the hang of it, the keyboard shortcuts Ctrl-Opt-arrows or Shift-Ctrl-Opt-arrows are really handy, even Cmd-Opt-arrows and Shift-Cmd-Opt-arrows for the following kern pair. The only trouble is that sometimes you slide off the Opt key, and you suddenly you are messing up your spacing rather. But fear not, there is help! You can switch Glyphs into kerning-only mode if you repeatedly click the lock in the bottom right of the window until it looks like this:
This means that spacing is disabled, and kerning is enabled. So Ctrl-arrows is ineffective, and will not do anything. Until you click on that icon again, of course.
While we are at it, it is a good idea to set up keyboard shortcuts for stepping through sample texts. Set up good text samples in Glyphs > Preferences > Sample Strings. Then, access them through Edit > Select Sample Text… And in Glyphs > Preferences > Shortcuts, you can add keyboard shortcuts for Edit > Other > Select Next Sample String and Edit > Other > Select Previous Sample String. That way you can kern, step to the next sample string, kern, step to the net sample string, kern, and so on, until you grow tired of it. And you can kern even quicker if you play faster music while you’re kerning.
Avoid negative overkerning. Any given glyph should not be kerned more than half of its width. Better less than that: To be on the safe side I personally suggest to never kern more than 40% of a glyph’s width. Why? Because otherwise the triplet ‘T.T’ will end up tighter than the pair ‘TT’. And that is also the most typical example: an uppercase letter with following punctuation, like a comma or a period.
Avoid GPOS table overflows. Internally, OpenType fonts are made up of so-called tables that hold information. On of these tables is called GPOS, short for ‘glyph positioning’. Among other things, it stores all the kerning info. Sometimes that table ‘overflows’, meaning that it becomes larger than the allowed maximum of 64 kilobytes. If, while trying to export a font, you get a GPOS overflow error, do any of the following:
- Reduce the amount of kerning: get rid of small and insignificant pairs. A Latin-only font should have between 500 and 1500 pairs, not more. In Cyrillic, you typically have much less kerning.
- Reduce the amount of exceptions: group-to-glyph and glyph-to-group kerning cause trouble, particularly of the group involved is large.
- In File > Font Info > Font, add the custom parameter Use Extension Kerning. It does some magic and allows for more kerning. It used to be problematic because it is was deemed less compatible. In fact, some old apps do not support Extension Kerning, but these apps are all twenty years and older, and it is better to ignore those apps.
Then try to export again. Repeat until the font exports without an error.
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:
- Select all glyphs in your target font, because this will only import kerning for selected glyphs.
- Choose File > Import > Metrics and pick the font file you want to copy the kerning groups from.
- In the dialog that appears, pick whether you want to import kerning and/or kerning classes (another word for groups):
The import function accepts UFO and Glyphs files. The Import Kerning option is only active when you import from .ufo files. But wait a minute, what if I want to import the kerning from a .glyphs file?
Easy: with the kerning window. Read on.
You can manage, sort, and above all, copy and paste kerning via Window > Kerning a.k.a. 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 (or another master in the same font) and paste them into the kerning window of that font. Kerning groups are displayed with a preceding at sign (@) and in blue, individual glyphs in brown.
And of course, the kerning window will give you an overview of all kerning pairs for the currently selected font master and writing direction:
You can sort the kerning by clicking in the respective column headers. Clicking a column header again toggles the sort order between ascending and descending. If you click a pair in the Kerning window, Glyphs will insert the glyphs for the selected 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 magnifying lens next to the search field in order to access additional search options:
Wait, there’s more. Take a look at the gear menu at the bottom right of the kerning window. There are three helpful functions hidden there:
- Clean up removes ineffective kerning values, e.g., leftovers like kerning entries of letters that are not in the font anymore.
- Compress does two things. First, it turns exceptions into group kerning as much as possible. To be precise, it will turn glyph-to-glyph kerning into group-to-glyph kerning, and glyph-to-group or group-to-glyph pairs into group-to-group kerning. So you may need to compress twice. Secondly, it 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.
- Show all glyphs will give you an overview of all possible combinations of the currently selected kern pair: all group members of the left side with all group members of the right side:
If you think that single-unit increments do not work for you in kerning, you can set your own. To do this, open Window > Macro Panel and paste the following:
Glyphs.defaults["GSKerningIncrementHigh"] = 20 Glyphs.defaults["GSKerningIncrementLow"] = 5
Then, press the Run button. This will set your Cmd-Option-arrows and Ctrl-Option-arrows to steps of 5 units, and your Shift-Cmd-Option-arrows and Shift-Ctrl-Option-arrows to 20 units. Of course, you can replace the numbers 5 and 20 by whatever you feel comfortable with.
To reset the kerning increments to their default, simply run this code in the Macro window:
Glyphs.defaults["GSKerningIncrementHigh"] = None Glyphs.defaults["GSKerningIncrementLow"] = None
This deletes the settings and Glyphs will revert to the default, increments of 1 and 10 units.
There are many plug-ins and scripts helping you cope with kerning. Feel free to explore Window > Plugin Manager. Here are a few highlights:
Kern-A-Lytics by Frank Grießhammer visualizes kerning across masters, and lets you edit, average and interpolate kerning values. Useful for finding inconsistencies. Glyphs lead developer Georg Seifert ported it to Glyphs:
Show Kern Values displays the kerning values above the text.
Mark Frömberg’s Show Kerning Groups superimposes all glyphs of the left and right kerning groups of the current glyph. Sounds complicated? But it’s clear once you see it:
Remove Kerning Exceptions removes all kerning exceptions of selected glyphs in the current master, leaving only group kerning intact. Useful in situations where you change the shape of a letter with a Rename Glyphs parameter, and its kerning exceptions do not apply anymore.
In the same download, by the way, there is Kernschmelze. It helps copy and interpolate kerning between masters of a font family:
- Set Kerning Groups 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.
- Adjust Kerning in Master can add a value to all kerning pairs, multiply all pairs by a value or round them by a value:
- Auto Bumper: specify a minimum distance, left and right glyphs, and Auto Bumper will add the minimum necessary kerning for the current master.
- GapFinder and KernCrasher open a new tabs with kerning combos that have large gaps or too little room between them:
- New Tab with Overkerned Pairs: Asks a threshold percentage, and opens a new tab with all negative kern pairs going beyond the width threshold.
- Sample String Maker: Creates kern strings for user-defined categories and adds them to the Sample Strings. Group kerning only, glyphs without groups are ignored.
- Remove Small Kerning Pairs and Exception Cleaner help reduce unnecessary kerning pairs.
Toshi Omagari’s scripts contain a few scripts for managing kerning. Among them:
- Display Unlocked Kerning Pairs shows exceptions in Edit view.
- Rename Kerning Groups renames kerning groups and pairs associated with them.
- Permutation Text Generator outputs glyph permutation sample text for kerning:
- Copy Kerning Pairs copies patterns, e.g., from caps to small caps. It supports pair-to-pair and preset group copying:
In Tim Ahrens’ Freemix scripts (full readme), there is a script for expanding kerning. Expanding is meant to be the opposite of compressing: it turns group kerning into all possible kerning exceptions. That means a lot of exception pairs. You have been warned.
I kept the best thing for last. Tim Ahrens wrote a commercial plug-in called Kern On. It takes a look at the kerning you have done and finishes it for you in a minute. No setting of kerning groups required, just good spacing. And for 200 bucks, you can forget the contents of this tutorial altogether. Just saying.
Sample Fonts: Playfair Display, courtesy of Claus Eggers Sørensen, cameo appearances of Lawabo Unrounded and Plantago, courtesy of Schriftlabor.
2016-02-16: updated for Glyphs 2 (thanks Sacha Rein)
2018-01-30: Added Custom Steps, Scripts, and note about Show All Glyphs
2018-08-10: added View > Show Group Members
2019-03-26: corrected typos (thanks Nathalie Dumont)
2021-09-29: updated for Glyphs 3, new screenshots, added extensions, tips, strategies, partial rewrite.
2022-11-03: removed a superfluous word (thanks Curtis).