Reputation: 24305
When I insert unicode emojis into a <span>
using standard jQuery they don't appear with Chrome (v48), but do with Firefox (v43) and Safari (v9). Compare these screenshots:
CHROME:
FIREFOX:
Any explanation here?
Upvotes: 5
Views: 12134
Reputation: 955
The solution was indeed the combination of all the answers above.
Without the <meta charset utf-8" />
, the emoji shows gibberish.
With font-weight: bold
, it shows nothing.
With font-weight: 600
it shows bold.
Thanks a lot for asking and answering.
Upvotes: 0
Reputation: 41
[] Additionally, if one has this issue and it's not related to the font-weight property, you may need to specify the 'charset' attribute in your head tag;
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<span>😸</span>
</body>
</html>
Upvotes: 3
Reputation: 23
It's actually because of the font weight. Set the font-weight to 200px
Upvotes: 1
Reputation: 24305
The issue is that the span had font-weight:bold
. As soon as I put font-weight:normal
, the emojis appeared.
Upvotes: 7