build_emoji: Generate CSS files for all the emoji sets.

Modify the `build_emoji` tool to copy spritesheets for all the
emojisets to emoji cache and generate CSS files for them.
This commit is contained in:
Harshit Bansal
2017-04-01 20:50:32 +05:30
committed by Tim Abbott
parent e52f2b5aba
commit c70cfa2188
2 changed files with 17 additions and 10 deletions

View File

@@ -15,6 +15,9 @@ import ujson
from six.moves import range, zip
from typing import Any, Dict, List, Text
# Emojisets that we currently support.
EMOJISETS = ['apple', 'emojione', 'google', 'twitter']
# the corresponding code point will be set to exactly these names as a
# final pass, overriding any other rules. This is useful for cases
# where the two names are very different, users might reasonably type
@@ -249,8 +252,7 @@ def generate_emoji_catalog(emoji_data):
# the emoji sets so that we can switch emoji sets seemlessly.
def emoji_is_universal(emoji_dict):
# type: (Dict[Text, Any]) -> bool
emoji_sets = ['apple', 'emojione', 'google', 'twitter']
for emoji_set in emoji_sets:
for emoji_set in EMOJISETS:
if not emoji_dict['has_img_' + emoji_set]:
return False
return True