Skip to content

Commit

Permalink
Merge pull request #341 from m4rc1e/vf-name
Browse files Browse the repository at this point in the history
Fix vf filename round 2
  • Loading branch information
m4rc1e authored Mar 8, 2021
2 parents e12f178 + 9c76856 commit b564c99
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Lib/gftools/builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ def run_fontmake(self, source, args):
return [os.path.join(original_output_dir, x) for x in file_names]

def rename_variable(self, fontfile):
if "axisOrder" not in self.config:
font = TTFont(fontfile)
self.config["axisOrder"] = sorted([ax.axisTag for ax in font["fvar"].axes])
axes = ",".join(self.config["axisOrder"])
newname = fontfile.replace("-VF.ttf", "[%s].ttf" % axes)
font = TTFont(fontfile)
assert "fvar" in font
axis_tags = sorted([ax.axisTag for ax in font["fvar"].axes])
axis_tags = ",".join(axis_tags)
newname = fontfile.replace("-VF.ttf", "[%s].ttf" % axis_tags)
os.rename(fontfile, newname)
return newname

Expand Down

0 comments on commit b564c99

Please sign in to comment.