diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-09-17 05:46:33 +0300 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-09-20 16:16:04 +0000 |
commit | 3757aec8c8d76a19f8083cb4542a6553adf01f00 (patch) | |
tree | 8beba8691c47478168a0ce4db1eeb6b272ec1b78 /recipes-graphics/ttf-fonts/files/cleaner.py | |
parent | 498293ce0cc0cd0fe8ecb8a1f1cb0db8bd1541d0 (diff) |
ttf-dejavu: remove emoji glyphs from dejavu fonts
Derivate of DejaVu without characters listed as emoji, in order not
to override color fonts.
Ref: https://aur.archlinux.org/packages/ttf-dejavu-emojiless/
Bug-AGL: SPEC-2701
Change-Id: I6e01b62ff8e4051a4bb4db81b1a0b4f22a4cc4ec
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'recipes-graphics/ttf-fonts/files/cleaner.py')
-rw-r--r-- | recipes-graphics/ttf-fonts/files/cleaner.py | 10 |
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 000000000..9b9261339 --- /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]) |