For now I'm messing around trying to figure out how to convert emojis from unicode to utf-8 to utf-16 and back... aarrgh!
I went down that road for a bit, too, and then discovered that they wouldn't work on computers using Windows 7 :-( So I went a different route.
First, I downloaded the "Appl" of all of these as one single sprite image:
[
unicode.org...]
Then I set up a CSS that I load at the bottom of the homepage (I actually set up an overly complicated system so that it sets a cookie once it's loaded, then I test for that cookie on each page to try and reload it if necessary), and in it I created a class for each unicode name; eg,
.u1f600 { background... }.
I'm saving the unicode in my database, then in PHP I just convert the it to an <img> tag where the source is a 1x1.gif with the appropriate sprite classes.
From my testing, as long as the initial CSS has been loaded then it loads just as fast as using the unicode, but without worrying about compatibility. Eventually I'll go through their user agent and only use PHP's str_replace if they're using something older than Win10, and in a few years I hope that it will be completely unnecessary.