-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support contextual anchors #921
Conversation
76f92e0
to
e3a4edf
Compare
I have to be honest here and say I've done what I need to make my font project work, and if anyone actually needs this in glyphsLib they're welcome to take it over. |
8b6f580
to
ec02004
Compare
I added a simple test and I think this is good enough to merge. |
0e8b76f
to
7ef50f0
Compare
7ef50f0
to
0a8daed
Compare
Also improve how the code is written by skipping lone semicolon when there is no before part.
c66175b
to
5d3cdd8
Compare
I haven't looked a the logic of this proposed ContextualMarkFeatureWriter because I don't know how this contextual anchors are supposed to work, but I am a bit worried that this might make it more complicated to maintain and debug the MarkFeatureWriter, as we would then have code scattered across multiple repositories. I don't mean to block this, I understand there is a need to implement this, but I wonder, would it be possible to activate this special writer only when the .glyphs source actually contains such contextual anchors, and otherwise use the vanilla markFeatureWriter in ufo2ft? I suspect the majority of projects don't make use of this specialized writer and thus do not need to, so to speak, incur this added "risk" of higher debugging/maintenance cost introduced by the default use of this glyhps-specific writer. Does it make sense? |
I want to extend this mark feature writer to also filter out anchor that start with non-alphanumeric character (googlefonts/ufo2ft#175 and googlefonts/ufo2ft#510), and possibly more in the future since it is not ideal to impose Glyphs-specific anchor naming conventions on UFO files (where anchor naming conventions are lightly specified). |
Add missing GdefFeatureWriter, and remove unneeded mode option from KernFeatureWriter since we now always add insertion marker comment to always generate kern feature even if a manual feature exists.
See #910. This implements the
*top
(etc.) anchors with an embedded custom context, causing them to replace standard anchor positions in certain contexts. Tested fairly extensively on an internal font project, but: