Unicode Variation Selector-15 and some of my tears

From my phone, I noticed that my website was displaying footnote backlink glyphs as emoji in my RSS reader. It had not always been this way. I opened the same page from a desktop browser and saw what I expected to see: a text-like pictograph, in my article body’s font face. No emoji to be found. I checked the HTML document source:

<a href="#fnref:1" class="reversefootnote" role="doc-backlink">
  &#8617;
</a>

The RSS feed XML contained the same. So, that can be presented as either text or an emoji? &x8617; is an HTML representation of the Unicode codepoint U+21A9, Leftwards Arrow with Hook. This led me to many relevant threads, pastes, and blog posts1 in which others had observed similar issues with Leftwards Arrow with Hook and other, similar navigation-decoration characters. We were all reacting to U+21A9 as rendered without a Unicode standardized variation sequence specified. So it’s up to whatever program is rendering U+21A9 to decide what to do. Which version, the text or the emoji, should U+21A9 render.

I found the correct solution and some less correct solutions to this issue. Before I describe them, I want to explore a slightly larger problem introduced by variation selectors.

The downstream effects

For meta-ish content characters like backlink glyphs, the way forward is clear for people who are technical: fix and/or configure the thing that builds your web pages. Or complain in the direction of the people who can fix and/or configure the thing.

For many of the other characters, it’s more complicated. Many of these characters are used in body content to be expressive. Rendering the text presentation instead of the emoji presentation, at worst, could be a mistranslation. The technical standard (see the emoji-data links, and specifically emoji-data.txt) lists over 1,000 Unicode codepoints that have both text and emoji presentations.

Codepoint Glyph As text
(+U+FE0E)
As emoji
(+U+FE0F)
U+00A9 © ©︎ ©️
U+00AE ® ®︎ ®️
U+2328 ⌨︎ ⌨️
U+25B6 ▶︎ ▶️
U+2603 ☃︎ ☃️
U+2620 ☠︎ ☠️
U+267B ♻︎ ♻️
U+1F310 🌐 🌐︎ 🌐️
U+1F312 🌒 🌒︎ 🌒️
U+1F37C 🍼 🍼︎ 🍼️
U+1F441 👁 👁︎ 👁️
U+1F509 🔉 🔉︎ 🔉️
U+1F590 🖐 🖐︎ 🖐️
U+1F635 😵 😵︎ 😵️
U+1F636 😶 😶︎ 😶️

Table 1 A small sampling of the 1,000+ Unicode codepoints that have both text and emoji presentations. The Glyph column may look different to you, depending on the application you're using to read this article. I would hope the the +U+FE0E and +U+FE0F columns do render the same way for everyone.

There is no obvious, cut-and-dry user experience for writers here. Pictographs and emoji are regular text as far as most programs are concerned, and variation selectors remain invisible unless you go looking. Did the author mean to present an umbrella ⛱︎ or an umbrella ⛱️ ? We don’t know what their writing tool presented to them during editing. They don’t know that we don’t see what they think we see when we’re reading the thing. In a perfect world, all software knows about and inserts variation selectors for the user. In reality, we know that software is bad.

I found documentation that indicates that the Unicode Technical Committee is aware that variation selectors are complicated,2 and maybe weren’t the best strategy.3 But what’s done is done and can’t be undone when it comes to the Unicode Standard.

The most correct solution

You can specify, in your source document, which version you want rendered. You do this by combining the variation selector codepoint with the preceding codepoint you want to render. In my case, that’s U+FE0E, Variation Selector-15. Using my source document’s backlink HTML markup as an example:

<a href="#fnref:1" class="reversefootnote" role="doc-backlink">
  &#8617;&#xFE0E;
</a>

And, if I wanted, I could do the opposite: force the emoji presentation, using U+FE0F, Variation Selector-16.

↩︎

Fig. 1 The pictogram via U+21A9 U+FE0E.

↩️

Fig. 2 The emoji via U+21A9 alone, next to the emoji rendered via U+21A9 U+FE0F, where U-FE0F, Variation Selector-16 coerces the glyph to use its full-colour emoji variant.

The Deja Vu Mono pictogram for Leftwards Arrow with Hook The iOS emoji for Leftwards Arrow with Hook

Fig. 3 Here's the image of the pictogram version and the iOS emoji version as rendered via U+21A9 alone. As I've already mentioned, which variant you see sans-selector can differ per application.

So, I can fix this issue for myself. I’m fortunate that I build the software that generates this website; and I’m fortunate that the library I use to generate HTML from my Markdown source documents (Kramdown) has a configurable footnote backlink glyph. There are authors using the Mistune library (for example, via the Bear blogging platform),4 or perhaps some other niche content rendering library, that don’t have the same luxury as of this writing.

Some less reliable solutions

If you’re in a position where you don’t control the software that builds HTML from your source documents, and, for some reason, it’s not possible to insert a variation selector character where you want it, there are some other things you can try. (At least for applications that use CSS for document presentation, like web browsers.)

font-variant-emoji

The font-variant-emoji CSS property is not currently supported in Safari. Hopefully it will be soon. It allows you to specify the preferred presentation of unicode characters for which ever DOM elements you like:

<article style="font-variant-emoji: text;">
  <span>Umbrella &#x26F1;</span>, or
  <span style="font-variant-emoji: emoji;">umbrella &#x26F1;</span>.
</article>

But I don’t think this can ever be a foolproof solution. Even wide web browser support doesn’t fully account for web content being presented by non–web browser applications like feed readers, and so on.

font-family: monospace

If you want an even less reliable solution, setting the font-family CSS property to the value monospace sometimes works:

<article>
  <span style="font-family: monospace;">Umbrella &#x26F1;</span>, or
  <span>umbrella &#x26F1;</span>.
</article>

But this only forces emoji-presented characters to be text-presented characters. And monospace is a generic font specifier that may look different from device to device.

Codepoint Solution Glyph +U+FE0E +U+FE0F
U+26F1 none ⛱︎ ⛱️
U+21A9 none ↩︎ ↩️
U+26F1 font-variant-emoji: text ⛱︎ ⛱️
U+21A9 font-variant-emoji: text ↩︎ ↩️
U+26F1 font-variant-emoji: emoji ⛱︎ ⛱️
U+21A9 font-variant-emoji: emoji ↩︎ ↩️
U+26F1 font-family: monospace ⛱︎ ⛱️
U+21A9 font-family: monospace ↩︎ ↩️

Table 2 A table demonstrating the less reliable solutions.

  1. Here’s a short list of the most interesting links I found while looking into this:

    ↩︎

  2. Holbrook, Ned: “Emoji Subcommittee Report for UTC #171 (2022Q2),” 22 April 2022 [PDF]:

    A suggestion was made to emojify an existing character rather than add a new one. Regarding the proposed U+1FAAF KHANDA, Chris Hennick suggested the existing U+262C ADI SHAKTI be emojified instead. The ESC notes that doing so could affect the rendering of documents using ADI SHAKTI and that the UTC prefers distinct characters for new emoji for this reason [emphasis added]. ↩︎

  3. Bettencourt, Rebecca; Ewell, Doug: “Proposal to disunify Symbols for Legacy Computing from emoji,” 14 October 2023 [PDF]:

    The UTC has determined that unifying text and emoji characters was a mistake, and that attempts will be made to prevent further such unifications. The Emoji Subcommittee even has a standing agreement with the UTC to only propose new characters rather than adding the emoji property to existing characters, and to avoid creating new presentation sequences. The Symbols for Legacy Computing proposals have resulted in the opposite case of needing to use existing emoji characters as non-emoji; regardless, the requirement to prevent emoji unification still applies. Upon reviewing Buff’s proposal, the Script Ad-Hoc (including the members most opposed to the Symbols for Legacy Computing proposals) came to the consensus that the best approach is to propose these as separate characters. ↩︎

  4. As evidence, here’s a link to an archived version of “Cities need more trees” on the Bear blogging platform by the creator of Bear, Herman Martinus, which uses Mistune to render HTML from Markdown. Currently, when I visit the webpage on iOS I see the full-colour emoji version of Leftwards Arrow with Hook instead of the pictogram. But in Firefox on my Linux distribution I see the pictogram. ↩︎