Syntax error at "lookup"

The full error message in the terminal is this:

syntax error at “lookup” missing TAG [features.fea 65]

After hitting cmd+i, and trying to update, I get this.

Error: “syntax error at “lookup” missing TAG [features.fea 65” in Feature tnum in line: 2

Just updated my version to the latest cutting edge version, still the same error, which points to this in the features file.

feature tnum {
script ;
lookup tnum0 {
sub zero.LP by zero.LT;
sub one.LP by one.LT;
sub two.LP by two.LT;
sub three.LP by three.LT;
sub four.LP by four.LT;
sub five.LP by five.LT;
sub six.LP by six.LT;
sub seven.LP by seven.LT;
sub eight.LP by eight.LT;

There is a n empty ‘script’ tag. Delete that line and it will work.

you might try to rename your glyphs to be able to get automatic feature code: https://www.glyphsapp.com/tutorials/figure-sets

Hi guys,
Just FYI: I’m new to Glyphs and have zero experience with Phyton. I’m just a designer hoping to find an alternative to FontForge (unstable) and Fontographer (stuck in the past), one that lets me focus on design instead of getting lost in programming/coding.
I’m currently designing a Sans library font and use 30-day trials of Glyphs and Robofont before I decide which app to invest in.
I know this is an old threat but probably still better than opening a new on on the same topic.

When trying to generate/compile Feature in “Features” I get error messages like the following:

> Error: “syntax error at “]” [features.fea 49” in Class Cedilla in line: 2

I have no idea what to do with that. Some sort of syntax error, obviously, but I don’t understand where these issues came from nor how to solve these errors or how to prevent them in the future.

I’d appreciate some help here! Thanks in advance!

Your OpenType feature code is faulty, the spot on question probably referring to a glyph that does not exist or is set to not export. Look at the code position that causes the error, and immediately before. Sometimes the message misplaces the error by one word.

If you do not want to deal with feature code, consider deleting the handcoded features, and let the app automate the code.

Thanks mekkablue.
Where do I access said code and what do I look for, how do I recognize the faulty code part? Is there a specific code file containing that code, and if so where do I look for that file?
What exactly is the difference btw automate vs hand-create futures - meaning how do I automate that process now that I already have designed/compiled 99% of the features?
Again, sorry for naive sounding questions but I’m not a programmer/coder and I was hoping to be able to focus on design rather than dealing with python and other code languages. Maybe that is an illusion…?

Thanks!

Please read this tutorial: https://www.glyphsapp.com/tutorials/troubleshooting-a-font-that-does-not-export

So you ported files to Glyphs? These two tutorials will help:
https://www.glyphsapp.com/tutorials/porting-to-glyphs
https://www.glyphsapp.com/tutorials/importing-existing-fonts

The app can create the feature code for you, based on the names and name suffixes of glyphs present in the font. There is ample documentation about this: find the tutorials for the respective features, and take a look at the Handbook (download from the Get Started page), in particular the section about glyph names, and the Appendix (which contains a list of glyph names and suffixes that can trigger code automation).

Take a look at File > Font Info > Features. This is where you manage the features. Again, there is ample documentation in tutorials and Handbook.

meaning how do I automate that process now that I already have designed/compiled 99% of the features?

Do you want to write the code yourself? Then look at the point in the code the error specifies and fix it.

Or do you not want to deal with code? Then delete the hand-written code and automate it. Be prepared to rename glyphs according to the glyph naming convention that the feature automation expects. This tutorial will help: https://www.glyphsapp.com/tutorials/getting-your-glyph-names-right. I do not know which features you have, but the Tutorials page has a search function.

AFDKO feature code has nothing to do with Python.

You claimed that you ‘already have designed/compiled 99% of the features’. What do you mean by that? How did you design and compile features if you did not deal with feature code?

In the second line of the OT class Cedilla, the compiler encountered a syntax error when it reached the closing square bracket ]. The dialog should offer you a Show button that takes you quickly to the spot in the feature code. I suspect that the word before the closing bracket is a glyph name that does not exist in the font (perhaps because it has been renamed).

In the temp file features.fea, it is located in line 49. But usually you will not have to deal with the temp files.

Thanks!

I designed most of the font in FontForge (tweaked and compiled some of the features by hand there) and then imported the .ufo file into Glyphs.
I did not knowingly name or rename any of the glyphs myself but put together my own charset, basically an extended Latin-5 set (in FontForge).

By 99% I meant that most accents and features are in place.

Klicking on “Show” points to a particular glyph, not to code lines.
So if I get that right, at this point I have to either correct the faulty code lines in mentioned features.fea file (whatever code language it is) or kill all features and let Glyphs compile them.
But maybe the code language itself is not the issue, but there’s a Unicode naming convention violation and correcting this within the .fea file would do the trick? Is that correct?

Thank you for your time and help! I understand the need for me to dive a bit deeper into the Glyphs documentation.

Thanks again!

The glyph names are not faulty. Glyphs changes some names on import (if you don’t tell it to not do that in preferences). That way, the feature code gets out of sync. That can be corrected. So you don’t need to delete everything but it might be easier doing so. It depends a bit on what features you have and what they are supposed to do. You can set the ‘automatic’ check box and see if the code is still doing what you need. Otherwise hit cmd+z and fix that feature manually.

Thanks Georg!
What do you mean by “delete everything”?

When I go with Generate features automatically and Update and/or Compile is when I get mentioned error message.
And the Show button points me to a specific glyph, in this case to the cedilla 00B8. It doesn’t take me to the spot in teh feature code as per mekkablue’s suggestion. Maybe I’m just struggling with terminology here.

If I decide to correct the feature manually, what does that mean?
Do I look for that particular character or line in features.fea and check if it’s according to unicode naming conventions?
I attached a screenshot with the feature.fea file opened in TextMate. Line 49 doesn’t seem suspicious (to me). But maybe the empty brackets at @Cedilla = [ ];? Should the space between the brackets be populated with the respective glyphs/characters that should have the cedilla attached to them? Something like @Cedilla = [ a c d e etc. ];?

Aw, I get it, mekkablue, it does point me to the Glyph’s code window. I didn’t see this. In the case of the cedilla it was empty (= no code). So I guess you meant that I can change the “code” directly within that “feature compiler” window. Sorry for missing your point!

Still, what exactly do I change in the described “cedilla case?” Can you guid me in more detail for this one? Once I understand what to do here I can hopefully solve similar issues without help going forward.

Thanks!

You need to check where the @ cedilla class is used. Then you should understand that glyphs need to go into the class (yes, classes can’t be empty). If it is not used anywhere, you can delete it.