Typophile

FontLab Error: invalid first character in name (text was ".null")

Martina Walthert0 votes

After generating the font, this error message appears:

invalid first character in name (text was ".null")[1_tiger_0306:Applications:FontLab 4.6:fontlab.fea 208]

does anybody know anything about this error? what does it mean? which "name" and which "text" is meant?

thank you!

Do your OT features involve substitution from or by '.null' glyph? Or did you kern it with another glyph? Then try removing this kerning pair in the metrics panel, update the kern feature, and generate the font again.

finally we found a glyph named ".null" in our font. deleting it, we solved the problem.

If you generate OTF fonts (with PostScript outlines):
Only '.notdef' must be present, but not '.null' and 'CR'.

If you generate TTF fonts (or OTF with TT outlines):
'.notdef', '.null' (unicode '0000'), 'CR' ('000D') and 'space' ('0020') should be the first four glyphs in your font, in this order. To reorder them, set the Font Window to Index Mode, then pull the glyphs the the correct place.

What I meant was, make sure '.null' is not mentioned in any feature.

Ouch! I've got a similar error after establishing all my kerning classes and generating the kern feature. When I click to compile the opentype features...

[FATAL] invalid first character in name (text was "01e9")

U+01e9 is kcircumflex. I've tried deleting this glyph, I've tried regenerating the kern feature and I've run the above solutions but still get the same error.

Hopefully this is something straightforward...I don't like FATAL errors...can anyone shed any light ;)

Well you've awakened an old thread, but it doesn't look like the original problem was ever fully sussed out. The "name" in question is the glyph name, which must conform to some rules established by Adobe quite a long time ago. Some font tools are more lenient than others with respect to glyph names, and sometimes a tool can assign an illegal name. This can cause trouble when another tool expects or requires strictly legal names and that is what's going on here.

From http://www.adobe.com/devnet/opentype/archives/glyphnamelimits.html section 4 (emphasis mine):

A glyph name may be up to 31 characters in length, must be entirely comprised of characters from the following set:

A-Z
a-z
0-9
. (period)
_ (underscore)
and must not start with a digit or period. The only exception is the special character ".notdef".

"twocents", "a1", and "_" are valid glyph names. "2cents" and ".twocents" are not.

Both of the glyph names here violate the emphasized part above; ".null" begins with a period and "01e9" begins with a digit.

To fix the "invalid first character in name" issue, you need to change the glyph name(s), not delete the glyph. There may be other glyphs with illegal names, too. You might try FontLab Studio's function to assign glyph names based on Unicode if you have a lot to rename.

> must not start with a digit or period.

Interesting. I'll check through all the names. I think they're in the format uni1234 but some could just be 1234. If I use the 'assign glyph names' function, the classes and features will all need search/replace too right?

I've a feeling I might just have to wipe my kerning classes and start again. Before I made the classes (and changed the glyph order) the opentype features were compiling correctly.

I'll let you know how I get on. Thanks for the pointers.

Ok well it looks like there was something not right in the kerning classes. I wiped them, reassigned glyph names, then remade the kerning classes. With the new glyph names I had to search/replace in the other feature definitions. Now it compiles correctly and I get great looking opentype class kerning! :)

(PS there's now a warning that [WARNING] Start of new pair positioning subtable; some pairs may never be accessed: [z zacute zdotaccent zcaron uni01B6] [t uniFB06 ct ft ft.alt it] but I'll live with that unless I can figure out what to do about that...)

That warning usually means that you have the same glyph in more than one kerning class.

Note: You can have a glyph in two kerning classes if they are not for the same side of a kerning pair.

Aah, thanks Mark, I'll have a look at that.

Captured from web.archive.org on 28 Feb 2018. view this capture