Zero Width Joiners: The Invisible Character That Makes Compound Emojis Work
The family emoji, the mixed skin tone couple, the gendered profession emoji, all are built with an invisible character called the ZWJ. Here is how it works. There is an invisible character hiding inside some of the emojis you use every day, and without it, those emojis would fall apart into their components. The character is called the Zero Width Joiner, often abbreviated ZWJ, and it is the mechanism that lets Unicode combine multiple emojis into a single new one. The family emoji, the mixed skin tone couple, the firefighter with a specific gender, all of these are sequences built with the ZWJ. I want to explain how it works because understanding it demystifies a lot of emoji behavior that otherwise looks random. I first encountered the ZWJ when debugging why a family emoji was breaking into three separate people on an older device. The device received the correct code points but did not have the combined glyph in its font. Instead of showing a family, it showed a man, a woman, and a boy with invisible characters between them. The ZWJ was doing its job, but the rendering engine could not fulfill the request, so it fell back to showing the components. What the Zero Width Joiner Actually Is The Zero Width Joiner is code point U+200D. It is a formatting character, which means it has no visible glyph of its own.