summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/ttf-fonts/files/cleaner.py
blob: 9b9261339b249eed92339b022216a51e1211383f (plain)
1
2
3
4
5
6
7
8
9
10
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])