-
Notifications
You must be signed in to change notification settings - Fork 783
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
Unicode mapping, codepoint fixes, and tests! #37
Conversation
Emoji digits and # are normal ASCII digits followed by COMBINING ENCLOSING KEYCAP (0x20e3). http://www.unicode.org/~scherer/emoji4unicode/20091221/emojidata.html
…entionally failing. Fix to follow.
Neato! I generated the emoji initially -- lemme see if I can get NIGHT WITH STARS... |
Hrm... I'm a bit confused. We already seem to have a 1F303 that's aliased as "stars" -- you know, I think they may have changed this between iOS versions... Any one have any ideas? I'm attaching what I believe is the right "night with stars" at the right size, but I'm not sure what to make of the code name conflict. ...pretty sure that's the right one (according to the OS X Font Book, anyway, which is where we got the original names...) |
Oh, duh -- I skimmed over your comment about that, @javan. I'll add you to the repo and you can fix that up and merge this in, aight? ...aaand I see you're already a collaborator. Make it so! 👈 |
I think it got mixed up in #16 because http://code.iamcal.com/php/emoji/ has it wrong. See "night with stars" and "shooting star" there. |
Word -- this is ready to go, then. Drop in that image and merge 'er up, @javan BTW I did the extraction with https://github.com/tmm1/emoji-extractor -- thanks @tmm1 🤘 |
150c509 ❤️ |
:man_in_business_suit_levitating: |
Nice! Have a few small comments. |
unicodes = Dir["./images/emoji/unicode/*.png"].map { |fn| File.basename(fn) } | ||
aliases = Dir["./images/emoji/*.png"].select { |fn| File.symlink?(fn) }.map { |fn| File.basename(fn) } | ||
used_unicodes = aliases.map { |name| File.basename(File.readlink("./images/emoji/#{name}")) }.uniq | ||
puts unicodes - used_unicodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was like "hey, why did you delete this!" at first, but I actually ❤️ the idea of making it a test. It should always be true.
I like the method names here better than #35. |
Ah, rad, I wanted to merge #26 a long time ago, but I think I hit that issue as well. Nice. |
I figured out now to snarf Apple's emoji dictionary (https://github.com/github/gemoji/blob/unicode-mapping/Rakefile#L10-L16) and comparing their emoji to ours, it looks like we've got a bunch of code points that need updating. 😐 |
Weird -- just looks like we need to remove the "-fe0f" from all of those. Anyone know what that's about? |
My test output isn't super clear. The format is:
So, we need to add "fe0f" to many of ours. Looks like it's to disambiguate emoji from its plain text twin. Like |
Possible related history #20. |
56da9a8 explains the "fe0f" variation selector and adds support for it. We should be all caught up with the latest emojis and their code points now. |
Rad. Feel free to merge whenever you like. Sent from my iPhone (in China)
|
Unicode mapping, codepoint fixes, and tests!
Merged and tagged. I don't have permission to push a new gem though. |
Done. 🤘 |
Unfortunately, installing gemoji from rubygems (i.e. a .gem file) kills the unicode mapping because the symlinks are lost. It appears that building the gem copies all of the files specified in the gemspec ( Anyone know if this is a bug or feature, and if there's a way around it? Installing from github works so that's one workaround. # gem 'gemoji'
>> File.symlink? "/usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/gemoji-1.5.0/images/emoji/cry.png"
=> false
# gem 'gemoji', github: 'github/gemoji'
>> File.symlink? "/usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/bundler/gems/gemoji-7755a8a18197/images/emoji/cry.png"
=> true |
It doesn't look to me like there's a way to store symlinks in a gem. Seems like we'll need to get that information elsewhere. |
We could generate the mapping in some kind of pre-release task. For now, On Friday, January 24, 2014, Adam Roben notifications@github.com wrote:
|
Hot on the heels of the http://emojisaurus.com launch comes this hot pull request.
Inspired by #35, I added methods to convert name→unicode and unicode→name.
I added a suite of tests, one of which attempts to verify our unicode codepoints. Here's how it looked prior to this PR.
I merged in #26 to fix all but one of those. Turns out 🌠's codepoint was misidentified so I fixed that up too (8e09854).
That leaves us with one new failure because⚠️ we're missing an emoji⚠️
@juliamae, how did you generate the .pngs initially? We need a new one for "NIGHT WITH STARS"
U+1F303
/cc @josh @trevorturk @asianmack @jonasd