Tell ufo2ft mark feature writer to use mark prefix for mark classes#1121
Tell ufo2ft mark feature writer to use mark prefix for mark classes#1121khaledhosny wants to merge 1 commit intomainfrom
mark prefix for mark classes#1121Conversation
ufo2ft default to `MC` prefix for mark classes, but Glyphs uses `mark`, since feature code can reference auto generated code, we want to match Glyphs here. Depends on googlefonts/ufo2ft#965
|
The regression test failures are just the new key being written to UFOs. It will fix itself once this PR is merged. |
|
FYI I'm not ignoring this, the reason I haven't merged this (and the companion ufo2ft PR) is that I need to think about how this particular change would play out in fontc (which is supposed to track fontmake) |
No problem. IIUC, fontc does not generate feature code that way ufo2ft or Glyphs app do, it instead compiles to binary lookups directly. So I don’t think something like this is going to work with current fontc architecture as there are no generated mark class names to reference. Referencing generated code It is a niche Glyphs trick, so I think it is OK if fontc does not support it for now (it will already fail to build any font that references the generated code, e.g. the generated kerning classes) with or without this change. |
I have a font that already references |
|
Not needed now that ufo2ft will change the default prefix (googlefonts/ufo2ft#974). |
The compiler could add the classes to the internal state to allow make them accessible to fea code. |
I have an idea that I’ll try later (extending fea-rs FeatureProvider to allow querying the caller for missing class names, then other parts of fontc that call fea-rs would provide the class definition on the fly). |
ufo2ft default to
MCprefix for mark classes, but Glyphs usesmark, since feature code can reference auto generated code, we want to match Glyphs here.Depends on googlefonts/ufo2ft#965