Kerning class not detected in Features

When I want to use the kerning classes (groups) made in the standard UI but in the OT feature code, it gives me an error of undefined class name.

Thanks for the report. I see. The error should only be in the UI, exporting the font should be fine. I’ll have a look.

Tosche, how do you reference kerning groups in the feature code? A left and a right group can have the same name, but feature code requires all names to be unique. We’ll have to decide on some special syntax to distinguish between the two (like the prefixes in the exported feature code).

I have always referred to the standard UI groups by the actual names by adding “@MMK_L/R_” prefix. It does require advance knowledge, but I think it could be excusable since the kind of stuff I’m doing is probably also advanced anyway (i.e. handwriting kerning code & recycling the groups made in the UI). For me personally, it’s fine as long as it’s consistent with how kerning groups are named in the file and other formats like UFO, and the app doesn’t give me warning.

OK. This works already and awaits the next build. I’ve kept the @MMK_L/R_ prefix. As far as the new feature editor is concerned, kerning groups are now also treated like regular classes, including the Option-click preview and autocompletion (kerning groups fall below all other classes in the completions list).

2 Likes

Just a heads-up: in build 3051, you’ll have to override the ‘kern’ feature (an empty feature will do) and list it before the feature that references the kerning groups. Otherwise, you’ll get an undefined glyph class error on export (kerning and its classes are exported at the end if not overridden in the feature list). I’m working on a fix to get rid of that inconvenience.

1 Like

No hacks like this are necessary any more (kerning classes are now exported before any features, so they’re safe to reference anywhere in the feature list).

3 Likes