summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/ttf-fonts/files/cleaner.py
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/ttf-fonts/files/cleaner.py')
-rw-r--r--recipes-graphics/ttf-fonts/files/cleaner.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/recipes-graphics/ttf-fonts/files/cleaner.py b/recipes-graphics/ttf-fonts/files/cleaner.py
new file mode 100644
index 00000000..9b926133
--- /dev/null
+++ b/recipes-graphics/ttf-fonts/files/cleaner.py
@@ -0,0 +1,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])