Emoji in eBooks? Use HTML entities
Preceded by the emoticon, emoji were first launched in Japan in 1998 and spread to the rest of the world via the Unicode Consortium. It’s even possible to propose your own emoji to the Unicode Consortium, as described in this video from the WaPo. There are numerous articles on the ambiguity of emojis…
…but for explanations of what they’re meant to mean, you can go to emojipedia.org.
Emoji come to publishing
The increasing prevalence of emoji use affects the publishing industry because as more and more people adopt them, so too is there an increase in their use in books, specifically contemporary fiction where authors are wont to represent text messages, emails and other digital communication.
So how do we set these emoji in books? Well, with printed material there are font packages readily available that contain all the emoji you can think of, but what of the eBook edition? Do we snip out a little image of the emoji on the page and set it in
<img> tags? Only as a last resort. With unpredictable device image-rendering and, for example, KindleGen’s tendency to resample images according to its own arcane parameters, we need another solution. This is where encoding comes in.
We use HTML entities. There are various different types of entity: named (
’), hexadecimal (
’) and decimal (
According to the Adobe blog, the top three used emoji are 😂 , ❤️ , 😘 . In our experience, the three most common emoji used in books are ☺, ☹ and ♥, so for your ready reference, here’s the entity references for those:
WHITE SMILING FACE ☺
WHITE FROWNING FACE ☹
BLACK HEART SUIT ♥
For more comprehensive listings, check out W3, which has a list of emojis along with their different code points (entity references), while Oliver at GitHub has compiled a huge list including all the family and animal emoji, for less scrolling and an interactive UI, check out &what;.
Emoji comparison image from: GroupLens Research, University of Minnesota