Skip to content

Commit

Permalink
Add version to font file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w committed Jul 8, 2022
1 parent 42440ab commit c3955d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/generate-font.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ def addIcon(iconId, icon):
}

with open(jsonfile) as f:
for iconId, icon in json.load(f)['icons'].items():
addIcon(iconId, icon)
fontData = json.load(f)

for iconId, icon in fontData['icons'].items():
addIcon(iconId, icon)

font.appendSFNTName("English (US)", "Version", fontData['version']['string'])
font.version = fontData['version']['string']

font.generate(os.path.join(outputdir, fontname + '.ttf'))
font.generate(os.path.join(outputdir, fontname + '.woff'))
Expand Down

0 comments on commit c3955d3

Please sign in to comment.