Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji Detection not working on Chrome OS #4

Open
rumpaar1 opened this issue Aug 22, 2017 · 6 comments
Open

Emoji Detection not working on Chrome OS #4

rumpaar1 opened this issue Aug 22, 2017 · 6 comments

Comments

@rumpaar1
Copy link

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
Copy link
Author

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
Copy link
Owner

ncase commented Aug 23, 2017

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
Copy link
Author

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

@workingjubilee
Copy link

workingjubilee commented Aug 15, 2019

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
Copy link

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
Copy link

workingjubilee commented Aug 18, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants