Kerning feature missing from Glyphs Export file

Hello, I am VERY new to Glyphs so please excuse my lack of knowledge. I have an Indic font designed and built in FontLab. As you would know FLS5 cannot generate Indic fonts with the full set of required features (eg Above-base Mark Positioning etc) so I need to transfer the file to Glyphs. I used the Glyphs Export script and opened it in Glyphs 2. Everything imported perfectly EXCEPT for the kern feature. I looked at the Glyphs Export file in a text editor and the kern feature is simply not there. Another Indic GPOS feature called Distances (tag: dist) uses exactly the same syntax as kern and it exports perfectly in the Glyphs Export file.
So I have two questions:
(1) Why is the kern feature missing from the Glyphs Export file and how can I get it into the Glyphs Export file?
(2) If it is not possible to get the kern feature into the Glyphs Export file, how can I import my kern feature directly into Glyphs 2? I tried importing via the .fea file and that didn’t appear to work.
Any help would be truly appreciated! Thanks, Kevin

The script only exports the kern data and not the kern feature as the feature is generated automatically. Normally the content of both is the same. I need to change the script to ignore the dist feature, too.
Do you have kerning that is only in the feature?

Yes, you’re right, I have kerning that is only in the feature. My kern feature is generated with Karsten’s incredibly useful “Make kern Feature KLTF” script. I use this script because, due to the large number of pairs, the kerning generated by FLS results in a stack overflow so the font won’t compile/generate. Is the kerning in Glyphs 2 capable of generating a kern feature that never results in a stack overflow?

Regarding your plan to also ignore the dist feature, wouldn’t this create a problem? The kern feature can be created from kerning groups/classes together with an .afm (provided it can guaranteed there will be no stack overflow) but, while there are certainly Distances groups/classes, the dist kerning pairs are NOT in the afm so how could Glyphs automatically create the dist feature? Please excuse my ignorance if I have misunderstood.

Thanks for your help with this, Kevin.

Try the latest beta. The algorithm is much improved.

Glyphs can derive both kern and dist from the kerning data stored inside the font.

I’m not quite clear on this. To explain my situation - in my Indic/Devanagari font I am using the Kern feature exclusively for the Latin characters (including transliteration). The Distances feature is used exclusively for Devanagari glyphs. So [kern] and [dist] are separate and mutually exclusive features. The Kern and Distances feature have their own set of groups/classes and there is no overlap between these groups. If I was to put the Distances kerning pairs into the .afm file together with the pairs for the Kerning feature I’m wondering how would Glyphs2 “know” how to create the two different features [kern] and [dist]???

By the way, I was wondering - if I was to manually insert my kerning feature into the Glyphs Export file, would that be correctly read by Glyphs2. Would it break anything?

I appreciate your help with these issues, Kevin.

Glyphs knows what glyphs/classes are ‘Latin’ and what are ‘Devanagari’ and can split the pairs between the kern feature and the dist feature.
You can add your own kern feature but that is not recommend. It is better to keep all info in the glyphs file. Why would you like to do this?

I already have a complete self-contained kern feature, so pasting it into the Glyphs Export file seemed like a logical way to get it into Glyphs2. I already tried creating a new blank feature in the Features list, naming it KERN and pasting my existing kern script in there but it wouldn’t compile (it compiled OK in FLS5). I noticed that scripts in the Feature list window don’t show the "feature kern { " at the beginning or the “} kern ;” at the end so I removed these from the pasted-in kern script (I assume Glyphs2 creates these automatically) - still wouldn’t compile though.

Thanks for your time answering all these questions. I’m very new to Glyphs and starting to learn it at the “deep end” with an extremely complex Indic font :smile: A real baptism of fire, as they say. Kevin

If you use uppercase characters (KERN), it is assumed to be a private feature. If you use the lowercase name kern, it will inject the a lookup in the kern feature. Which is useful for contextual kerning.

do you have a fundamental problem with the kern feature generated by Glyphs?

I recommend to let Glyphs generate it from the kerning data. This gives you preview in Glyphs (for Latin and Devanagari and allows easy changes that are not possible otherwise.

So all you need to do is to import the kerning data and don’t care about the feature code. You can check if everything is there in the Kerning Panel.