Skip to content

Commit

Permalink
Merge pull request #739 from googlefonts/prune-ds-sources-location
Browse files Browse the repository at this point in the history
builder/sources.py: only write locations along defined axes
  • Loading branch information
anthrotype authored Oct 27, 2021
2 parents e00221c + ed23b66 commit 5b15a65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/glyphsLib/builder/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ def _to_designspace_source(self, master, is_regular):
)
n += 1

designspace_axis_tags = {a.tag for a in self.designspace.axes}
location = {}
for axis_def in get_axis_definitions(self.font):
location[axis_def.name] = axis_def.get_design_loc(master)
# Only write locations along defined axes
if axis_def.tag in designspace_axis_tags:
location[axis_def.name] = axis_def.get_design_loc(master)
source.location = location


Expand Down

0 comments on commit 5b15a65

Please sign in to comment.