googlefonts / googlefonts/fontmake
fontmake [ufo2ft] fails to build from Glyphs file when contextual kern references MMK classes
- Dominant language
- Python
- Stars
- 888
- Forks
- 97
- Avg merge
- 4d 52m
- Merged PRs (30d)
- 1
Description
I have a Glyphs file with contextual kerning added like

and it references kern classes that are only built by Glyphs on export. So something like this

becomes `@MMK_L_myclass`
Exporting from Glyphs is fine because it builds the GPOS automatically and then appends this custom kern to that before compiling. Unfortunately, with fontmake and ufo2ft these are processed in the reverse order and also no MMK classes get created. So during `ufo2ft.featureCompiler.parseLayoutFeatures` it fails to parse this lookup because there is no class `@MMK_L_myclass`, first because that class no longer exists at all and second because it tries to parse the existing features before running KernFeatureWriter.
Here is a simplified test file to show the behaviour, but the real file is a much bigger Noto source with many references to MMK_L and MMK_R classes.
[TestMe.glyphs.zip](https://github.com/googlei18n/fontmake/files/2790070/TestMe.glyphs.zip)
It's easy enough to hack my ufo2ft to make it keep this info in order, but that also means I have to replace `kern1.` with `MMK_L_` and `kern2.` with `MMK_R_` which is absolutely not the way we want to do this.
Contributor guide
Assessment
This issue has not been assessed yet.