fix_gasp.py 277 B

12345678910
  1. """Add gasp table which has same gasp ranges as previous static fonts"""
  2. from fontTools.ttLib import TTFont, newTable
  3. import sys
  4. font = TTFont(sys.argv[1])
  5. gasp = newTable("gasp")
  6. gasp.gaspRange = {8: 10, 13: 7, 65535: 15}
  7. font['gasp'] = gasp
  8. font.save(font.reader.file.name)