Typophile

newbie error message

JordanBell

Im trying to complete the opentype features of one of my fonts and when I compile the error message...

[FATAL] invalid token (text was "ƒ") [/Users/myname/Library/Application Support/FontLab/Studio 5/Features/fontlab.fea 36]

... comes up. For the past couple of hours I have tried to fix it but to no avail. And of course, if I cant compile my opentype features, but font is pretty much useless. I might not be able to figure it out just be because I'm a beginner at opentype font coding and scripting but any help would be great!

Thanks.

Do you have stored the florin in the feature file (in line 36) instead of the name of the character (probably florin)?

I went to it (through the directions the error message gave me) and didn't really find anything.

But then I went into the feature file and found the character ƒ and replaced it with "Florin" (the name of the character). Is there a way to save the file as a .fea now though? I opened it in Textedit on my Mac. I cant figure out a way to save the changes I did to the .fea file outside of Fontlab and I cant find the error string in Fontlab, so I'm a bit confused on what to do now.

In the OpenType panel, you can "Open features" and "Save features" .fea files using the little flyout menu in the corner of the OpenType panel of FontLab Studio. Also, if you place a .fea file such as MyFont.fea in /Users/myname/Library/Application Support/FontLab/Studio 5/Features/ , then in the lower-part of the OpenType panel you can write just one line:

include(MyFont.fea);

(with the rest of the OpenType panel, and perhaps also the Classes panel empty).

This will link the OpenType panel to the external .fea file. This way, you do not need to edit the feature definitions in the OpenType panel, but instead, you can use the external file. This may have the advantage that you can use one and the same .fea file for multiple fonts.

Note that in this case, it's best not to include the "kern" feature in this external file. Instead, you should have the kerning defined in the Metrics Window, and have the Preference option "Generate OpenType & TrueType / Kerning / Generate OpenType 'kern' feature if it is undefined or outdated" enabled.

Best,
Adam

Is there a way to save the file as a .fea now though? I opened it in Textedit on my Mac. I cant figure out a way to save the changes I did to the .fea file outside of Fontlab and I cant find the error string in Fontlab, so I'm a bit confused on what to do now.

Yes. Just save the TextEdit file with a .fea extension, then read it in via the FL > OenType panel.

I have a separate features file for every font, and it (eventually) includes kerning. Edit it as you need, and save it. On the same flyout panel, there is also something like "Import Features," or "Open Features." That will let you read in the external features file you've created with the text editor. Then compile.

I do have a "basic" features file I start with, created with a text editor. But different fonts have different details, so I don't put it in the library, or use a link to an external file -- I read it in through that OT panel flyout.

Captured from web.archive.org on 12 May 2014. view this capture