This sometimes happens: You try to export a font via File > Export but all you get 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’ very own 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
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.
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.