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