builder/sources.py: only write locations along defined axes #739
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.
similarly to what we already do for instance.location at
glyphsLib/Lib/glyphsLib/builder/instances.py
Lines 90 to 96 in e00221c
Otherwise source.locations may contain a spurious third axis called "Custom" which may not alwyas be used (e.g. NotoSans only uses "Weight" and "Width".
We don't normally see this because fontTools.designspaceLib prunes those automatically upon writing the designspace file. But if one attempts to build a VF from the glyphsLib-generated designspace object (not the file path saved on disk), the extra undefined axis prompts an error while attempting to find the default location.