ncase / simulating

An interactive guide to thinking in systems!
http://ncase.me/simulating
187 stars 21 forks source link

Emoji Detection not working on Chrome OS #4

Open rumpaar1 opened 7 years ago

rumpaar1 commented 7 years ago

Emoji Support Detection is not working properly on Chrome OS [Version 59.0.3071.134 (Official Build) (64-bit)], is falling back to the black and white font when the browser does support colour emoji (colour emoji load before the detection script swaps them out for black and white).

rumpaar1 commented 7 years ago

OK. See that you are using effectively a whitelist of platforms that supported emoji back in early 2016. Chrome OS supports all of the Unicode 9.0 emoji in full colour now. Tested on macOS Sierra with Chrome and full colour emoji are supported (not blocked by script either). Segoe UI Symbol Black and White emoji supported on Chrome on Windows 7. Will do some testing on Windows 10 and 8.1 and will probably submit a pull request with an updated whitelist.

ncase commented 7 years ago

Thanks @rumpaar1! Yeah, at the time there wasn't (still isn't) a good way to consistently test whether an OS/browser had emoji, so I stuck to a whitelist. If you can send a PR with an updated whitelist that would be most excellent, thanks again!

rumpaar1 commented 6 years ago

Been a bit busy but I'll see if I can get around to it now.

workingjubilee commented 5 years ago

I think a better approach would be to use JavaScript to render and inspect the available emoji for a correct rendering. Modernizr uses this to resolve emoji detection, and it works fairly well, although I would probably use a slight variation on their approach rather than mirroring it exactly (it has trouble with pixel width variations on high-density "retina" displays... this is just a consequence of guessing where the best pixel to pick is, rather than picking a few and inspecting them, so since display is important, we can take a little time to do this and maybe note when we last did so in localStorage to avoid repeating the task often if it turns out it is slower than an eyeblink).

wizzwizz4 commented 5 years ago

This is a great approach! Checking whether the rendered picture is rectangular is probably sufficient, though; not all systems with Emoji support colour them in, for instance.

workingjubilee commented 5 years ago

Ah, I suppose this differs mostly on creator intent then? My impression based on the messaging was that the purpose of the current system was checking for multicolored emoji support, and offering a font that guaranteed at least BW unicode emoji if not. Happy to draft an implementation either way.