Can't compile/generate OpenType in FontLab 5.0.0 (WinXP)

amv's picture

I'm working right now on a rather simple, stylized font using FontLab 5.0.0 on WinXP. These are the only real specs:

- No metrics classes
- No kerning classes
- 2 kerning pairs only
- dnom / numr feature

Here's the code for the dnom/numr features:

feature dnom {
sub @dnom_normal by @dnom_ot;
} dnom;

feature numr {
sub @numr_normal by @numr_ot;
} numr;

Everything compiles and previews just fine in FontLab, but when I try to generate the font, I get this:

ERROR: There was a problem while compiling OpenType font. Final .otf font is not saved. Please, check OpenType features definition for errors

I can't seem to get any additional info on what's actually wrong, and the problem doesn't seem to be budging. The font is comlpetely finished at this point, so it's frustrating to not be able to build it.

Any help would be appreciated!

Tim Ahrens's picture

Just a quick guess: Have you put semicolons at the end of each line where necessary?
As far as I remember, not doing so results in that kind of unspecific error message.

k.l.'s picture

The OT compiler should show the number of the line which causes the trouble.

In the OT Panel, save the features, open the ".fea" file in a text editor (activate line numbering), and check if the mentioned line or the preceding contains any error.

amv's picture

Like I said, it's compiling fine; I can compile the OT code and see the results in the preview panel and it all behaves as it should.

The problem occurs only during the final output stage of the font itself, and the only error message/info I'm getting is what I pasted in my original post, which is very vague and seems to contradict the fact that I can compile it and see the results in the preview panel just fine.

oldnick's picture

As you observed, sometimes FontLab's error messages are remarkably unhelpful; just for grins, check for open contours...

k.l.'s picture

Since the facts we got are few, all we can do is -- guess. (Might even be that some value is missing in the FontInfo. But that's just another guess.)  :))

amv's picture

My first attempt at generating the font did indicate that there was one glyph with an open contour. FontLab highlighted it in red, I fixed it, and the error went away. I'm still left with this strange and vague OpenType issue, however, and as a result my font is still "unbuildable".

solfeggio's picture

No guarantees, but maybe this will help: snoop around at the location (folder or subfolder, directory or subdirectory - call it what you will) where you expect the generated OT font to be built. There may be an uncompleted build residing there with a goofball extension (look for something like "[name of your font]._tf"). If so, remove it or rename the extension (try "[name of your font]._tf_fail") and then retry your generation effort.

Such quirky behavior struck me thrice only when using FLS 5.0.0 on Win2K and the above procedure cleared the problem. Even though your difficulty may finally be different, I hope this helps.


charles ellertson's picture

ERROR: There was a problem while compiling OpenType font. Final .otf font is not saved. Please, check OpenType features definition for errors

Can't say I've ever had this one, but to check if it is true, save the features as has been recommended, then reset the features in the FontLab OT panel so there are none. If you can now make an OT font, then you know the problem is (most likely) in the features.

As I remember debugging 101, you add one thing at a time until you find the problem -- or alternatively, keep splitting the file in half until the problem is isolated. As has been suggested, by importing the features file, you can work in a text editor so you can see better, change file names etc. etc.

amv's picture

I saved everything out to a .fea file, then cleared out all opentype features and classes within the file. I closed the program, deleted the backup .bak files, opened it back up, and tried to generate an OTF without doing anything else.

Same problem. It seems that even with absolutely no OpenType features whatsoever, this is still a problem. Just as a sanity check I made a TTF, which of course worked.

For some reason, though, I get nowhere with OpenType.

acnapyx's picture

Some idea from an amateur (maybe very lame, but hey...)

Have you tried to do the numr/dnom replacement not using classes? Yes, it is tedious to make everything by hand, but (I guess) this might help... I have already stumbled upon this, and sometimes I prefer making OT entirely by hand - on a single character replacement basis, using classes only when it is absolutely impossible to avoid them. (Because debugging class errors is really close to reading uncommented ANSI C :)

Another idea: try to add the features directly to the already generated TTF - and regenerate it as OTF?

Also it is (funny, but yes, why not?) not a bad idea to restart the PC :) And maybe check with other versions of FontLab, even maybe do an upgrade, if it solves the problem... (If you have some old FL 4.6, maybe it will provide hints where the problem is hidden). But at this stage the things are already becoming too heavy...

Artur Schmal's picture

In FL preferences > Generating OpenType PS, did you enable 'Use subroutines to compress outlines in the CFF table'?

Might help.


johnych's picture


Disabling this option will help for sure.
And updating FL to 5.0.4 is recommended too.

Alex Petrov

Artur Schmal's picture


Perhaps you can give us some indepth information on this function and why it solves this particular problem?


charles ellertson's picture

Here is what I would do . . .

Take an old Type 1 font you've used for years.

Read it into FontLab.

See if you can make an OpenType font from it -- just read it in (make sure there are no parens in the copyright line) and see if you can generate an OT font.

If not, likely there is some problem with your installation of FontLab.

If so, the problems is likely with your font.

If it seems to be in your font, make a copy & throw away everything but two letters -- the space and something else, say "A". See if you can make an OTF font. If not, remove the "A" and try a "B".

If this initial test doesn't work, you need a guru beyond me, but likely someone here can help.

If this test does work, make another copy of the and remove half the lettes, & see if you can generate the otf font.. If not, keep removing half the letters until you can. If it is a single letter, pretty soon, you will have it isolated. If it is more than one letter it will take longer; I'd use an "addition" rather than a "subtraction" procedure (i.e., keep adding to what works).

One thing you might try first is to make the OT-TTF font, read it back in, change the curves to PostScript, and see if THAT will let you generate an OT-CCF font. But my guess is it won't.

Good luck

twardoch's picture


the Adobe AFDKO code that FontLab Studio uses to build OpenType fonts has several bugs, one of them involving subroutines. This has been fixed in the standalone AFDKO but Adobe also changed other things in AFDKO making it impossible for a simple fix on our end. We will incorporate the improved AFDKO code into the next major FontLab Studio release though.


andyclymer's picture

Adam and Alex,

I've heard more suggestions recently about turning off this "Use subroutines to compress outlines in the CFF table", could you tell me more what exactly could cause a bug to come up when using it? Is there a way I could test a generated OTF to find if there was a problem or not?


andyclymer's picture


Would you recommend turning off the "Use subroutines to compress outlines in the CFF table" option at all times or only when there's a problem generating the font?

Many thanks,

Read Roberts's picture

This is not a feature file problem - note that Andy tried removing all features and had the same problem.

All that CFF subroutinization does is make the font file smaller. It does this by finding bits of contours that are common to several glyphs, and sharing that bit between them. Think composite glyphs, but sharing just parts of an outlines. With some fonts, this can make the CFF table as much as 50% smaller, although it is more common to see size decreases of around 20-30%. It is rare to have a problem because of this; the bugs I know of happen when there are > 32K subroutines, and you usually run into this when you have > 10,000 glyphs. However, it does no harm to turn subroutinization off. The size difference of the final OTF font is usually don't matter on modern systems, unless you are targeting mobile device.

The approach suggested above by charles_e on 2.Nov.2007 6.13am seems the most practical. to me, although I'd do it the other way around; make a new font, then add the letters in gradually, then fix the FontInfo and other meta info to match the original, then add features.

- Read Roberts

Michael Wallner's picture

I had this same problem and I had no OT features, I was simply adding cyrillics to an existing typeface. I had renamed the cyrillic characters from the "afii" names to a more proper name, and when I went back to the "afii" names and generated the typeface I got "The feature file OS/2 overrides TypoAscender and TypoDescender do not sum to the font bbox size!". After making that change the typeface generated fine. I have no idea why that worked, but it did.

Best of luck.

billtroop's picture

I had this problem on Vista and was about to try generating on Mac, but instead I tried deleting the last 20 or so glyphs in the font and then appending them back. There were no problems generating.

deivis_alice's picture

I had the same problem.

I solved it deleting some glyphs.

Just when I had 309 glyphs the output panel shows "There was a problem while compiling OpenType font. Final .otf font is not saved. Please, check OpenType features definition for errors".

When I deleted one more and I had 308 It was compilated without problems.

I don't know why.

twardoch's picture

Sometimes this problem is caused by something completely different: FontLab Studio's "Generating OpenType" preferences are set to "Export only OpenType name records", yet in Font Info, the "Additional OpenType names" table is empty. Change the preference to one of the other settings, and your font should generate fine.

eigi's picture

Other source of possible problems:
If you have the option "Generating OpenType & TrueType/Kerning/Generate OpenType 'kern' feature if undefined or outdated" activated. Malformed kernig classes may produce invalid code for the kern feature.

You can make a dry run with "Tools/Kernig Assistance/update [kern] feature". This adds kern feature code in your OpenType feature panel. Try to compile again. If it fails the problem is in your kern class definition.


jhilgert00's picture


I got this same error over and over, but found a quick fix.

You MUST define a name for your font in File > Font Info before generating.
Once I did that, it generated just fine.

You can save the font as a "file" aka myFont.vfb and that's great, but you have to actually define the font name in Font Info to avoid this error, which BTW has nothing to do with the features as it says in the error.

I am having problems with some of my kerning not working, but that it unrelated.

Hope this helps.


twardoch's picture

Oh yes, of course. You cannot generate a font that does not have a Family Name, a Style Name, a Font Name and a Full Name.

matt_yow's picture


I'm having this issue as well.

I'm working with a font that I've generated into an .OTF multiple times. After some edits and changes now it gives this enigmatic error. I've tried some of the troubleshooting here — thanks for those — but are there any other suggestions? Compiling features from the OpenType window runs well, testing as .TTF works fine; the hold up is with the .OTF.

matt_yow's picture

this is really taking it out of me.

I unchecked Use subroutines to compress outlines in the CFF table—nothing.
I removed ALL OpenType information (Reset Features)—nothing.
I'm not a pro so I feel even more stumped that I don't know more options or possible solutions.

Sorry for the double post but are there any more options?

Syndicate content Syndicate content