问题
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>
🧙︎ 🎩︎ ✨︎ 🍔︎ ⌛︎
</body>
</html>
回答1:
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.
来源:https://stackoverflow.com/questions/54592208/why-unicode-variation-text-selector-for-emoji-works-only-on-subset-of-emojis