Troubleshooting a font that does not export

Tutorial
by Rainer Erich Scheichelbauer
en fr zh

24 January 2020 Published on 12 June 2013

Sometimes, you try to export a font but instead you get weird error messages. Here is how to fix that.

You tried to export a font via File > Export but all you got is a weird error message that says makeotfGlyphs. Huh?

Now, this means that the built-in makeotf command (which, as you probably have guessed, makes OTFs) choked on the font data it was supplied with. The most likely cause for this is a bad glyph name. But to find out what precisely the problem was, we need to run the makeotf command ourselves and see what happens.

To do that, you simply click on the Details button of the error dialog. It will take you straight to the Temp folder of the font project at hand. You can skip the next two paragraphs.

Or, if you do not have a Details button on your dialog, we need to go to ~/Application Support/Glyphs/Temp/. The quickest way is via the Script > Open Scripts Folder command. Glyphs will open the folder in Finder. Or actually, it opens its enclosing folder, Glyphs’ Application Support folder. There you may find various stuff: besides the Scripts folder, you may also find Plugins and Info folders. But what we are interested in now, is the Temp folder.

Now, inside the Temp folder, you will find OTFs and a bunch of subfolders containing all your recent font projects, neatly organized in subfolders. Each folder contains a number of files that are necessary for producing your OTF. One of them is the temp folder of the font you just tried to export. Hint: It helps to sort by Date Modified.

One of the files inside the font’s temp folder is called generateFont.command:

Double click it and your Terminal will open. There, the makeotf command will spit out all sorts of notifications, documenting the production process for your OTF. You can skip notes and warnings, but do look for lines that start with [FATAL]. These are the ‘fatal’ errors that prevented the generation of the font file. Usually towards the end of the output, just above from where it says [Process completed], you will see something like this:

In this case, the [FATAL] line says, ‘multiple glyphs euro Euro mapped to code 20ac’. This means that there are two Euro signs inside the font, one called euro, another one called Euro, and they both have the Unicode 20AC. Now you know what to do: Go back into Glyphs and delete one of the Euros, then export again.

Of course, your mileage may vary greatly. Plus, we have been hard at work making Glyphs give you descriptive error messages if something goes wrong. There is also a detailed Error Handling chapter in the Glyphs Handbook describing the various messages that may appear.

Subtable Overflow

Sometimes you will receive an error talking about a ‘GPOS Subtable Overflow’. Now GPOS is the OpenType table that stores glyph positioning info, hence the name. That include kerning and mark positioning. The most likely cause for the error is that you have too much kerning pairs, or kerning with large kerning groups and many group-exception and exception-group kern pairs.

There are several ways to deal with it. Try these steps in this order until the export works:

  1. Add a custom parameter called Use Extension Kerning to File > Font Info > Font > Custom Parameters and turn it on.
  2. If you can, get rid of mark and mkmk features, which store information about combining-mark positioning. Don’t worry, it will not affect your compounds. In File > Font Info > Instances, in every instance that fails to export, add a custom parameter called Remove Features. Click on its Value, and add mark and mkmk on separate lines.
  3. Go to Window > Kerning, and start getting rid of some your kerning pairs, perhaps compress kerning via the gear menu. Consider using the mekkablue scripts in the Kerning submenu. There are a bunch of scripts that start with Remove Kerning, which may help you.

Good luck.

Export Never Stops

You get the export dialog with the spinning symbol, and it just doesn’t stop? Like, you have been waiting for minutes already?

Chances are you are exporting a CFF font with complex outlines. The most likely cause for the never-ending export is the subroutinization of outlines, which only works well and efficiently for simple and clean outline structures. With a simple custom parameter called Disable Subroutines, its value being on, in File > Font Info > Font, your problem may be solved.

However, do read the tutorial about complex outlines and see if you can find more handy tips.

MakeOTF Syntax Errors

Syntax errors in the OpenType feature code are a special case. Especially if you have outdated or manual code in File > Font Info > Features, you may get a dialog titled MakeOTF Error, pointing to a problem in a certain line in the feature code:

If you have a Show button in the dialog, click on it. Glyphs will take you to the problematic spot in the feature code. If the code is automated (i.e., the Generate Feature Automatically option is on), try the Update and Compile buttons at the bottom of the Font Info > Features window. If that does not solve the problem, or if you have manual feature code, you will have to take a closer look at what exactly the error message says (again, the Error Handling section in the Handbook will be of great help here), and the exact spot the error message points to.

But careful: MakeOTF error messages sometimes miss the problematic spot. If it says, for instance, syntax error at "Udieresisgrave" in Class Uppercase, naturally, you will look and see if there is anything fishy about Udieresisgrave. Is the glyph there at all? Is it set to export? Does it have a proper Unicode value? But if you cannot find anything wrong with the glyph in question, chances are the problem is located immediately before. So, what about the glyph mentioned right before Udieresisgrave? Have you mistyped something? Is there superfluous syntax, like a stray semicolon or bracket? A non-ASCII character? It may even be an invisible character, especially when the code line starts with the mentioned glyph name.

You see, it can be pretty much anything, but at least you know where to look.


Update 2016-12-30: added note about Details button and section about MakeOTF Syntax Errors.
Update 2020-01-24: added Subtable Overflow and Export Never Stops.
Update 2020-02-10: corrected typo, deleted words very own), changed word Overflow to Overview, corrected handbook links.