pkgbuilds/ttf-dejavu-emojiless/cleaner.py

11 lines
231 B
Python
Raw Permalink Normal View History

2020-02-04 15:04:35 +08:00
from json import load
from sys import argv
ttf = fontforge.open(argv[1])
for emoji in load(open('emoji.json')):
try:
ttf.removeGlyph(int(emoji['unified'], 16))
except ValueError:
pass
ttf.generate(argv[1])