summarylogtreecommitdiffstats
path: root/cleaner.py
blob: 8b1b354e767f3c4d44bffb7aa7d02241f6ec84d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from json import load
from sys import argv

otf = fontforge.open(argv[1])
for emoji in load(open('emoji.json')):
    try:
        if(emoji['non_qualified'] is not None):
            otf.removeGlyph(int(emoji['non_qualified'], 16))
        else:
            otf.removeGlyph(int(emoji['unified'], 16))
    except ValueError:
        pass
otf.generate(argv[1])