How to check if character isn't supported by the user's browser in JavaScript?

前端 未结 2 1950
情话喂你
情话喂你 2021-01-11 19:59

I\'m building a site that uses a lot of emojis. Kind of like the one\'s you\'re used to seeing when texting, or on Instagram, Facebook, etc.

Examples:

相关标签:
2条回答
  • 2021-01-11 20:16

    Browsers do not "support" displaying unicode characters, it's the font that is responsible. Of course, you can always directly include the font that you want to use to display the characters in the emoji section in Unicode with CSS.

    Here is a free and open font that can display emojis.

    In case you want to detect if a font exists, here is a tool for that.

    0 讨论(0)
  • 2021-01-11 20:23

    As others have noted.. It's not the browser but the font.. So specify a font that supports all your emojis

    0 讨论(0)
提交回复
热议问题