kinduff/emojitwitter — pull request #2 by vic (2014-05-29 07:28:15+00:00)
Title: Display emoji characters with fallback provided font.

I'm using chome on OS X Mavericks and loading emojitwitter
was working fine except for the emoji unicode points not
being shown as emojis, they were just shown as a little square.

My first solution was trying to see why those code points were
not being displayed as they are when you see a tweet that includes
an emoticon.

Turns out, twitter detects when a tweet has an emoticon unicode
range, and it doesnt actually shows the code points on the webpage.
It just generates a wrapper image tag with their own emoji images.

So I was trying to embed an image like that on the tweet box editor.
However, the twitter page uses a MutationObserver on [content-editable]
elements that actually trims out any html tag (for security), thus
removing any emoji icon I'd place within it.

Then I investigated on how to display those unicode points on chrome
and found an extension: chromoji that actually does that. The way
it works, is it just declares a new font-family using a font with
content for those unicode ranges.

This commit just includes a free-to-use font from emojisymbols.com
that gets injected into the twitter page and we append the new
emojitwitter font-family so that unicode points on emoji range
use that font.