joypixels / emojione

[Archived] The world's largest independent emoji font. Maintained at https://github.com/joypixels/emoji-toolkit.
https://www.joypixels.com
Other
4.46k stars 535 forks source link

Multi-person emoji filenames #191

Closed xtian closed 7 years ago

xtian commented 8 years ago

Currently the filenames for multi-person emoji do not include the zero-width joiner (\u200d). This makes it difficult to write code that uses the list of files to generate a regex for image replacement.

For example, the filename for the “Family (Man, Woman, Girl, Boy)” emoji is 1f468-1f469-1f467-1f466.png, but the actual codepoint sequence is \u1f468\u200d\u1f469\u200d\u1f467\u200d\u1f466.

In this case, the interspersed \u200d characters are what distinguishes a sequence of four individual emoji from the Family emoji.

The best list I've found of emoji that use the zero-width joiners is: http://emojipedia.org/zero-width-joiner/

Would be very helpful to have this fixed! Thanks :)

miguelsousa commented 8 years ago

The official list of emoji ZWJ sequences is at http://unicode.org/emoji/charts/emoji-zwj-sequences.html

mikebe11 commented 8 years ago

Since the library is currently in working order with the file names as they are and the intended conversions are happening this change probably won’t be made very soon. It’ll require some refactoring and with limited time and resources it’s lower on the list to be attended to. Thanks for the suggestion. When possible we’ll revisit the idea of doing this. We have all of the full ZWJ sequences in our emoji.json file.

simonkberg commented 8 years ago

Also worth noting is that variation selector (U+FE0F) is stripped from the file names too, thus Couple With Heart (Woman, Woman) = U+1F469 U+200D U+2764 U+FE0F U+200D U+1F469 = 1f469-2764-1f469.png.

This is most likely the reason why these emojis are unsupported for the Emoji One style in Slack (https://github.com/iamcal/emoji-data).

caseyahenson commented 8 years ago

@simonkberg Great point!

eevee commented 8 years ago

@miguelsousa Careful referring to that list as "official" — it's just a list of sequences that exist in the wild.

miguelsousa commented 8 years ago

🙄

caseyahenson commented 7 years ago

@xtian With the release of 3.0 we've made converting filenames to a full unicode code point simple. The emoji.json file is now keyed by filename (otherwise referred to as the 'base' or 'base name'). Each entry now has an array of code points including 'output', which is what you'll want to use.

xtian commented 7 years ago

Thank you!