github/gemoji — pull request #63 by javan (2014-09-21 00:40:24+00:00)
Title: Extract PNG images from Apple's "Apple Color Emoji.ttf" font

WIP

The images currently included in this gem were extracted using https://github.com/tmm1/emoji-extractor and then renamed by hand (I think) to match their unicode hex values. emoji-extractor.rb uses a regex to parse out png data for each emoji, and isn't able to match them with their codepoints so they come out named sequentially (1.png, 2.png, etc.). See https://github.com/tmm1/emoji-extractor/issues/1.

Today I dug in and figured out where and how all the bitmap bits are stored in Apple's emoji font (hint, [right here](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6sbix.html)) and added support to the ttfunk gem for parsing it all out (PR: https://github.com/prawnpdf/ttfunk/pull/22). Combined with other character data in the font file, we now have enough information to identify and extract each emoji png at every available size (20x20, 32x32, 40x40, 48x48, 64x64, 96x96, 160x160).

You can see from this PR that many of the images have subtle color changes. I'm guessing that's because the originals were extracted long ago and Apple has since refined them.

One thought I had is that we could remove the included images from the gem and have people extract them on their own with a rake task.This would give them a choice of which size(s) to extract _and_ wipe our hands clean of any copyright issues. What do you think?

cc: @mislav, @josh, @trevorturk, @aroben, @tmm1

:tada: