Bug 1862332 [wpt PR 42877] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / gfx / harfbuzz / src / addTable.py
blob103f292dd6a4d70aacfe84b5ef5bb565fa3762b7
1 import sys
2 from fontTools.ttLib import TTFont
3 from fontTools.ttLib.tables.DefaultTable import DefaultTable
5 if len(sys.argv) == 1:
6 print("usage: python addTable.py input.ttf output.ttf Wasm.bin")
7 sys.exit(1)
9 font = TTFont(sys.argv[1])
11 wasm_table = DefaultTable("Wasm")
12 wasm_table.data = open(sys.argv[3], "rb").read()
14 font["Wasm"] = wasm_table
16 font.save(sys.argv[2])