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

Detect emoji support on Windows 7+ #1377

Merged
merged 1 commit into from
Jun 19, 2014
Merged

Conversation

aroben
Copy link
Contributor

@aroben aroben commented Jun 19, 2014

U+1F603 SMILING FACE WITH OPEN MOUTH is just an outline on Windows, so we weren't detecting that anything was drawn at all. Now we use U+1F428 KOALA instead, which is filled in by the Windows emoji font (Segoe UI Symbol). Since these emoji are monochrome on Windows 7/8, we set the fill color to red to ensure we get a non-zero red value from the pixel we sample.

@patrickkettner
Copy link
Member

Does setting the fill color not create a background on the smiley?

@aroben
Copy link
Contributor Author

aroben commented Jun 19, 2014

Nope, it looks like this:

screen shot 2014-06-19 at 1 44 40 pm

@aroben
Copy link
Contributor Author

aroben commented Jun 19, 2014

Here's the koala for comparison:

screen shot 2014-06-19 at 1 45 19 pm

I also tested that this change continues to detect emoji support correctly on OS X in Safari (supported) and Chrome (unsupported).

@patrickkettner
Copy link
Member

seems reasonable, I want to check the broader browser support to make sure we aren;t losing/gaining anyone else.

In the mean time, couldyou swap out those quotes travis is complaining about and rebase down to a single commit?

thanks @aroben !

@patrickkettner
Copy link
Member

oop, missed that you had pushed the change already - can you rebase? thanks again!

U+1F603 SMILING FACE WITH OPEN MOUTH is just an outline on Windows, so we
weren't detecting that anything was drawn at all. Now we use U+1F428 KOALA
instead, which is filled in by the Windows emoji font (Segoe UI Symbol). Since
these emoji are monochrome on Windows 7/8, we set the fill color to red to
ensure we get a non-zero red value from the pixel we sample.
@aroben
Copy link
Contributor Author

aroben commented Jun 19, 2014

Rebased!

@patrickkettner
Copy link
Member

like a machine, you are

@patrickkettner
Copy link
Member

support is identical across the board from my tests (IE 6-11, FF 3-26, Chrome 1-35, Safari 5-7, iOS 5-8, Android 1.5-4.2).

great catch, and wonderful PR, @aroben

patrickkettner added a commit that referenced this pull request Jun 19, 2014
Detect emoji support on Windows 7+
@patrickkettner patrickkettner merged commit b694dfe into Modernizr:master Jun 19, 2014
@aroben
Copy link
Contributor Author

aroben commented Jun 19, 2014

Thanks for making it so easy! ❤️

@aroben aroben deleted the patch-1 branch June 19, 2014 18:44
@patrickkettner
Copy link
Member

right back at cha, slick

On Thu, Jun 19, 2014 at 2:44 PM, Adam Roben notifications@github.com
wrote:

Thanks for making it so easy! [image: ❤️]


Reply to this email directly or view it on GitHub
#1377 (comment).

patrick

patrickkettner added a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Detect emoji support on Windows 7+
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

Successfully merging this pull request may close these issues.

None yet

3 participants