wip markFeatureWriter: only allow Nonspacing Marks to be classified as GDEF marks #392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current method to classify marks in the GDEF table is too greedy. If a glyph contains an anchor whose name starts with an "_", it will be classed as a mark glyph. Recently, this implementation has forced us to rollback some fonts we recently pushed
google/fonts#2453
I spoke with Cosimo last week and he had the following idea for a less greedy implementation which this PR implements.
I'm not too familiar with the ufo2ft lib so my implementation may be incorrect/suboptimal. My idea was to simply add this functionality to the
MarkFeatureWriter._getAnchorLists
function since it's already filtering anchors.Once we're happy that I'm adding this functionality in the correct place, I still need to do the following: