iamcal / emoji-data

Easy to parse data and spritesheets for emoji
MIT License
2.56k stars 301 forks source link

breast-feeding emoji, v13 2020 #169

Closed ccorcos closed 4 years ago

ccorcos commented 4 years ago

🤱 | breast-feeding | :breast-feeding | 38,56

How can we update this for the latest emojis? https://unicodey.com/emoji-data/table.htm

Also, any way to determine what platforms support which emojis?

EtienneLem commented 4 years ago

🤱 | breast-feeding | :breast-feeding | 38,56

According to https://emojipedia.org/breast-feeding :breast-feeding: has been introduced in 2017 as part of Emoji 5.0. emoji-data is built against https://unicodey.com/emoji-data/table.htm, so if the emoji can be found there it’s most likely included in emoji.json.

Validated on https://missive.github.io/emoji-mart (using latest emoji-data), I can find :breast-feeding:

How can we update this for the latest emojis? https://unicodey.com/emoji-data/table.htm

I believe Emoji 12.1 is the latest published version. Emoji 13 has yet to be released: https://emojipedia.org/emoji-13.0

Also, any way to determine what platforms support which emojis?

I don’t know if it would realistically be possible to keep track of. As far as I can tell it depends on both the platform and the browsers, at least it used to.

jwheare commented 4 years ago

The emoji version numbers in the data can be used to do some limited degree of platform support:

5.0 supported in macos high sierra (10.13) and later 11.0 supported in macos mojave (10.14) and later 12.0/12.1 supported in macos catalina (10.15) and later

In the browser, detection on Windows is harder because the user agent string has stayed the same for every minor version of Windows 10 that has subsequently added more native emoji support. 12.1 emoji are also not yet supported in Windows 10.

On linux it's harder still because it largely depends on a certain font being installed (Google's Noto Color Emoji), rather than distro/version number. And the font could be an older version.

Note also that there are exceptions, e.g.

A reliable method probably involves trying to render various emoji from different releases in a canvas element and then inspecting the pixel values to see if they have any colour values. I have not implemented this personally though.

ccorcos commented 4 years ago

Oh, I'm confusing that with "woman feeding baby".

Thanks for the help!

ccorcos commented 4 years ago

Also, any thoughts on how to sensibly order the emojis? Something similar to the Apple Emoji picker... I also noticed that Apple has slightly different categories.

EtienneLem commented 4 years ago

sort_order should be pretty much the same order as Apple, or close enough that you don’t really notice that much of a difference. Especially if you can search.

The new categories were a bit of a mystery to me, couldn’t tell where these were coming from. Since the latest version, Smileys & People has been divided into Smileys & Emotion and People & Body. Can’t just merge the emojis because the sort_order is per category. That being said, given these 2 new categories, if you take the first 114 emojis of the first one, all of the second one and finally the rest of first, you get a similar order than Apple and can make that a single Smileys & People category again. Here’s how we did it https://github.com/missive/emoji-mart/blob/master/scripts/build.js#L122-L129. It’s not perfect, but haven’t had a single complaint yet.

ccorcos commented 4 years ago

I see. You're correct. sort_order is exactly what I'm looking for. Thanks!