Skip to content

Commit

Permalink
Implement script to generate variable webfonts
Browse files Browse the repository at this point in the history
  • Loading branch information
naiyerasif authored Mar 26, 2022
1 parent 908603c commit bb8a9cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/generate_variable_webfonts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import glob
import os
from fontTools.ttLib import TTFont

for filepath in glob.iglob('fonts/variable/*.ttf'):
f = TTFont(filepath)
f.flavor = 'woff2'
f.save(os.path.splitext(filepath)[0] + '.woff2')

0 comments on commit bb8a9cd

Please sign in to comment.