Opened 8 years ago
Closed 8 years ago
#38113 closed enhancement (fixed)
Update Twemoji for Emoji 4.0
Reported by: | pento | Owned by: | pento |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Emoji | Keywords: | fixed-major |
Focuses: | Cc: |
Description
Twemoji just added support for the Emoji 4.0 spec, which is due to be finalised in November.
Here's a more readable list of the changes: http://blog.emojipedia.org/twemoji-2-2-emoji-changelog/
Changes we need to make to add support:
- Upload the new images to w.org (there are altered images, so it'll need a new directory).
- Change the URL in core to match (
_print_emoji_detection_script()
,wp_staticize_emoji()
) - Update
twemoji.js
. - Add a new
emoji4
test to the loader.
As we've done in the past, emoji updates can be backported to the latest point release, too.
Change History (16)
#3
in reply to:
↑ 2
@
8 years ago
Replying to superpoincare: for this ticket the tests can be added as they have been in the past and any improved practice worked out in #37817. There's some really helpful info on the other ticket.
#6
@
8 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Re-opening for 4.6.2.
#8
@
8 years ago
Hi @pento
Great. Also the emoji files at present are not gzipped and a it's a nice small performance gain to have them gzipped.
The UN flag svg for example is about 45KB unzipped and can be gzipped to 12KB which is a large reduction. Both MaxCDN and cdnjs where they are also hosted send them gzipped and IMO s.w.org should too.
#9
@
8 years ago
Thanks for the reminder, @superpoincare! I've asked the Systems team to investigate options.
#10
@
8 years ago
Hi again @pento,
There's one thing I noticed.
You are testing for the rainbow flag support and Mac Sierra has support for it. But I see Wordpress site https://wordpress.org/news/2016/08/wordpress-4-6-rc2/ which has the rainbow flag overrriding the native emoji with svg fetched from s.w.org. I tested it in Chrome 55 Dev on Mac Sierra on Browserstack.
Here's what I get by playing with development tools. (Emoji after "yet" added by me, the one below in original)
http://i.imgur.com/5F00Zs6.png
I am assuming the code tries to use native emoji as much as possible, so the expected behaviour is to not fetch the svg in this case. And if that's not the case, you'll just need one test for the whole code (woman technologist: medium skin tone).
#11
@
8 years ago
Additional comment with correction to last part of my previous comment:
The Shrug emoji is both in unicode 9 and emoji 4 with the latter having various variations. So won't one emoji: Woman Shrugging, Type-4 be enough for feature detection?
It will be odd for a browser to have support for this emoji (which is a part of Emoji 4.0) and no unicode 9 support.
So this alone can be used to feature detect right?
#13
@
8 years ago
Twemoji has updated to 2.2.2, so Wordpress might need to update if necessary. The update is deprecating support for skin tones for multiperson emoji.
#15
@
8 years ago
Replying to pento:
Thanks for the reminder, @superpoincare! I've asked the Systems team to investigate options.
I observed that Wordpress is now serving emoji via http2 and also has gzip compression. This is great!
Apologies if I am wrong, can't the feature detection now simply test rainbow emoji and decide whether to download wp-emoji-release.min.js?
The remaining feature detection can be done in the this js file itself.
This way, some performance loss in createElement("canvas") can be avoided. Mac Sierra browsers and future browsers will just see one detection test.
EDIT: Ignore the comment. Unicode 9.0 also seems important. So Sierra doesn't have it yet.