Fix duplicate glyphs3 GSMetrics; take the first and ignore 'filter' #1278
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.
GSMetric's
filter
attribute (that restrict a given metric to a group of glyphs, e.g. small caps) is not relevant to build OS/2 and MVAR tables. Some source contains those, normally following the same-named metric which is supposed to apply globally (and thus be stored in font wide metric tables).glyphsLib does parse these filter attributes but doesn't even use them, when looking up a metric by name it simply returns the first one it finds. Similarly here when we collect metrics by name, we only take the first one we find and ignore any duplicate that may follow.
Fixes #1269
After the fix, the following gives "output is identical"