Closed khaledhosny closed 2 months ago
can't we just bring in the whole contextual mark feature writer? It wouldn't be the first time we add some Glyphs-specific feature to ufo2ft which may benefit the rest of the UFO workflows
I wouldn't mind doing that. The current setup is not making things easy, but it wasn’t me who set it up this way.
@simoncozens do you agree with moving the glyphsLib's custom mark writer to ufo2ft to reduce the complexity?
Sure, it will make things easier now, and also in the future if we convince UFO to support contextual anchors.
OK, I’ll work on that.
Closing in favor of #869.
We don’t support contextual anchors in markFeatureWriter, but glyphsLib subclasses it and adds support for them. However, since we are unaware of contextual anchors, we end up with positioning statements with duplicated mark positions like this:
(one is the regular anchor, and the other is the contextual one). Which makes no sense (feaLib shouldn’t probably allow the same mark class to be used multiple times in the same statement).
This PR adds isContextual to NamedAnchor and ignores any such anchors when writing pose statements. It is already set by glyphsLib’s MarkFeatureWriter, but otherwise should not affect ufo2ft’s as it always sets it to False.