tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

addTable.py (403B)


      1 #!/usr/bin/env python3
      2 
      3 import sys
      4 from fontTools.ttLib import TTFont
      5 from fontTools.ttLib.tables.DefaultTable import DefaultTable
      6 
      7 if len(sys.argv) == 1:
      8    print("usage: python addTable.py input.ttf output.ttf Wasm.bin")
      9    sys.exit(1)
     10 
     11 font = TTFont(sys.argv[1])
     12 
     13 wasm_table = DefaultTable("Wasm")
     14 wasm_table.data = open(sys.argv[3], "rb").read()
     15 
     16 font["Wasm"] = wasm_table
     17 
     18 font.save(sys.argv[2])