emoji: Hardcode octopus emoji.

Google emojiset's octopus is really cute and whole Zulip community
loves it. So using a CSS hack, we hardcode octopus emoji to use image
from Google's emojiset only irrespective of the choosen emojiset.
This commit is contained in:
Harshit Bansal 2018-07-10 06:06:41 +00:00 committed by Tim Abbott
parent 3f73826ffa
commit 6c28a60db0
2 changed files with 14 additions and 0 deletions

BIN
tools/setup/emoji/1f419.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -59,6 +59,13 @@ span.emoji
overflow: hidden; overflow: hidden;
} }
.emoji-1f419
{
background-image: url('images-google-64/1f419.png') !important;
background-position: 0%% 0%% !important;
background-size: contain !important;
}
%(emoji_positions)s %(emoji_positions)s
""" """
@ -171,6 +178,13 @@ def setup_old_emoji_farm(cache_path: str, emoji_map: Dict[str, str]) -> None:
except FileExistsError: except FileExistsError:
pass pass
# We hardcode octopus emoji image to Google emojiset's old
# "cute octopus" image. Copy it to the emoji farms.
for emojiset in EMOJISETS:
input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, '1f419.png')
output_img_file = os.path.join(cache_path, 'images-' + emojiset + '-64', '1f419.png')
run(['cp', input_img_file, output_img_file])
def generate_map_files(cache_path: str, emoji_catalog: Dict[str, List[str]]) -> None: def generate_map_files(cache_path: str, emoji_catalog: Dict[str, List[str]]) -> None:
# This function generates the various data files consumed by webapp, mobile apps, bugdown etc. # This function generates the various data files consumed by webapp, mobile apps, bugdown etc.
names = emoji_names_for_picker(EMOJI_NAME_MAPS) names = emoji_names_for_picker(EMOJI_NAME_MAPS)