3

I've read this answer to related question about a way to turn graphic emoji into text representation. I've tested that and it worked.

I wanted some magic related character that I'd be able to stylize with css the way I need. Preferably magic wand, but that emoji is not available yet, so I've decided to go with Mage.

That's where my problems started. I've had a mechanism to turn emoji to text and I've had an emoji I want but this pair does not seem to work together. I've tested it in Firefox and Chrome. Both always show graphic representation. Mage emoji shows as text in Notepad++, so it's not that such representation does not exist (well I think it always should be available, while support for graphic version might not). What might be the reason that it is not working? Is there any other way to force text version?

Here's example of what I've tried ( with this result: ︎ ︎ ✨︎ ︎ ⌛︎ ):

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
 font-size: 5em;
}
</style>
</head>
<body>
&#x01F9D9;&#xFE0E; &#x01F3A9;&#xFE0E; &#x002728;&#xFE0E; &#x01F354;&#xFE0E; &#x231b;&#xFE0E;
</body>
</html>
j1rjacob
  • 411
  • 11
  • 27
Soul Reaver
  • 2,012
  • 3
  • 37
  • 52
  • It works for me if I switch the first character to `&x26a0;` so my explanation would be that these emoji are not (yet?) supported in the font you are using. – tripleee Feb 08 '19 at 12:18
  • But ⚠︎ is not a mage, that's different character :/ This might be related to font in some way, but actually I am not really sure if emojis are font dependant. I've tested it now a bit by changing fonts and all emojis remained the same, while added text was modified each time. I think support for emoji might be more device/platform or browser/app dependant. But if graphic version is displayed, it means this character is supported, but somehow, text version is not available :/ Like I wrote, in N++ Mage is displayed and simple character form. – Soul Reaver Feb 08 '19 at 12:42
  • 1
    Several of the answers in the question you linked to say they had to specify a particular font. – tripleee Feb 08 '19 at 12:44
  • I also saw it's OS dependant. Hard to tell. Emojis are not my kettle of fish, but actually this time I have a use for it (if this will work). I can always find some way around. – Soul Reaver Feb 08 '19 at 13:03

1 Answers1

7

Emoji variation selectors are an extension of Unicode’s generic variation sequence mechanism. Only those sequences explicitly listed as part of the standard are valid. Any system that supports special rendering for variants which are not considered valid cannot claim to be Unicode-compliant.

Emoji variation sequences are not defined for all emoji characters, but only those for which it was deemed necessary. In general, those are characters which originate from some non-emoji source (Zapf Dingbats, Wingdings etc.) but are used as emoji as well. All characters that support these variation sequences are listed in this chart (as well as the respective data file). Of the five characters you listed as examples, only the hourglass would be allowed to make use of the variation selectors while the other four must be left unaffected.

If you have full control over the styling of your page, you may be able to provide your own black-and-white font to be used for emoji characters which would then override the system’s default emoji font. This is also generally a good idea whenever you want to use emoji as regular text characters (even with valid variation selectors) because not every platform necessarily has font support for both text-style and emoji-style variants.

CharlotteBuff
  • 3,389
  • 1
  • 16
  • 18