From b9cb6199cf95440e0037afedaceffc3241942fd4 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 3 May 2017 13:01:53 -0700 Subject: [PATCH] emoji: Use lower-case hex letters in iamcal data. --- tools/setup/emoji/build_emoji | 9 +++++---- tools/setup/emoji/emoji_setup_utils.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/setup/emoji/build_emoji b/tools/setup/emoji/build_emoji index f6bbba0724..6f5731fdc3 100755 --- a/tools/setup/emoji/build_emoji +++ b/tools/setup/emoji/build_emoji @@ -270,10 +270,11 @@ def dump_emojis(cache_path): emoji_positions = "" for emoji in emoji_data: if emoji["has_img_google"]: - emoji_positions += EMOJI_POS_INFO_TEMPLATE % {'codepoint': emoji['unified'], - 'pos_x': (emoji["sheet_x"] * 100) / 40, - 'pos_y': (emoji["sheet_y"] * 100) / 40, - } + emoji_positions += EMOJI_POS_INFO_TEMPLATE % { + 'codepoint': emoji['unified'].lower(), + 'pos_x': (emoji["sheet_x"] * 100) / 40, + 'pos_y': (emoji["sheet_y"] * 100) / 40, + } for emojiset in EMOJISETS: sprite_sheet = os.path.join(EMOJI_DATA_PATH, 'sheet_%s_32.png' % (emojiset,)) run(['cp', sprite_sheet, cache_path], shell=True) diff --git a/tools/setup/emoji/emoji_setup_utils.py b/tools/setup/emoji/emoji_setup_utils.py index 5e4a7c1bbb..f46e322917 100644 --- a/tools/setup/emoji/emoji_setup_utils.py +++ b/tools/setup/emoji/emoji_setup_utils.py @@ -238,7 +238,7 @@ def generate_emoji_catalog(emoji_data): if not emoji_is_universal(emoji): continue category = str(emoji["category"]) - codepoint = str(emoji["unified"]) + codepoint = str(emoji["unified"]).lower() sort_order[codepoint] = emoji["sort_order"] if category in emoji_catalog: emoji_catalog[category].append(codepoint)