char/iocgn-mono
iosevka variant inspired by Simple Köln-Bonn
git clone https://git.t4t.associates/char/iocgn-mono
174e7ae
main
1"""Compress the finished static and variable TTFs for the web.""" 2 3from pathlib import Path 4 5from fontTools .ttLib import TTFont 6 7ROOT = Path (__file__ ).resolve ().parent .parent 8 9 10def main (): 11source = ROOT / 'build/TTF' 12output = ROOT / 'build/WOFF2' 13output .mkdir (parents = True ,exist_ok = True ) 14for path in sorted (source .glob ('*.ttf' )): 15destination = output / path .with_suffix ('.woff2' ).name 16with TTFont (path ,recalcTimestamp = False )as font : 17font .flavor = 'woff2' 18font .save (destination ) 19f'Compressed { path . name } → { destination . relative_to ( ROOT ) } ' ) 20 21 22if __name__ == '__main__' : 23main ()