Command line/batch processing of UFO to OTF when UFO is not complete and created by NoneLab?

Nagar's picture

Hi everybody,

I'm working on a project which allows to create an .otf font from a uncomplete UFO.

I found this topic (http://typophile.com/node/55559) and I proceeded as written but I have the following error:


$ python2.5 ufo2otf.py
03python/*.ufo
Compiling: TestFont1 (UFO2).ufo...
/Library/Python/2.5/site-packages/FontTools/sstruct.py:74: DeprecationWarning: struct integer overflow masking is deprecated
data = apply(struct.pack, (formatstring,) + tuple(elements))
/Library/Python/2.5/site-packages/FontTools/sstruct.py:74: DeprecationWarning: 'H' format requires 0 <= number <= 65535
data = apply(struct.pack, (formatstring,) + tuple(elements))
/Library/Python/2.5/site-packages/FontTools/fontTools/ttLib/sfnt.py:175: DeprecationWarning: struct integer overflow masking is deprecated
self.file.write(struct.pack(">L", checksumadjustment))
makeotf [Note] Converting source font '/font.otf' to temporary Unix Type1 font file '/font.otf.tmp'.
makeotf [Note] setting the DONT_USE_WIN_LINE_METRICS OS/2 fsSelection bit 7 from fontinfo keyword.
makeotf [Note] setting the WEIGHT_WIDTH_SLOPE_ONLY OS/2 fsSelection bit 8 from fontinfo keyword.
makeotf [Note] setting the OBLIQUE OS/2 fsSelection bit 9 from fontinfo keyword.
makeotf [Note] Writing options file /current.fpr
makeotf [NOTE] Running makeotfexe with commands:
cd ""
makeotfexe "-f" "font.otf.tmp" "-o" "TestFont1 (UFO2).otf" -ff "features" -gf "glyphOrder" -mf "menuname"
makeotf [Error] Failed to build output font file TestFont1 (UFO2).otf.
makeotfexe [WARNING] syntax error [glyphOrder:1] (record skipped)
makeotfexe [WARNING] syntax error [menuname:1] (record skipped)
makeotfexe [WARNING] not in Font Menu Name database [SomeFont-Regular]
makeotfexe [WARNING] [internal] Feature block seen before any language system statement. You should place languagesystem statements before any feature definition [features 3]
makeotfexe [ERROR] Glyph "b" not in font [features 4]
makeotfexe [FATAL] aborting because of errors
Done!

Does anybody have a suggestion / idea (which file to modify in the library, other library to use, code example,…)

Thank you very much for your help.

Nagar.

Theunis de Jong's picture

The error message is self-explanatory. In the features block the Opentype features are defined, and of course they refer to the characters that are going to be used. For that it does not need the "character code", but its glyph index instead (this is so you can have different glyphs that all represent the character 'b', for example; as well as glyphs that do not have a regular character code, such as a non-standard ligature).
So what the error message means is that one of the features refers to a "glyph b", which is not in your font, or so it appears.

Note that this error also may have happened because five errors earlier creating the font file itself failed.

Syndicate content Syndicate content