How to use an emoji font on a website?

前端 未结 3 981
后悔当初
后悔当初 2021-02-14 11:50

I\'ve downloaded Google\'s \"Noto Color Emoji\" font, but can\'t get it to work. I have no problems with fonts like \"Noto Sans Regular\". But with the \"Noto Color Emoji\" font

3条回答
  •  庸人自扰
    2021-02-14 12:17

    Color fonts are coming but you will need to either:

    • Implement all color formats in one font (4 in total!) -> I don't know if somebody did it but the font would be huge, and it looks really complicated and not recommended.
    • Make one font for each format and load it conditionally. -> Not recommended as some formats are bitmap based and not vectors & fonts can be huge (+20Mo).
    • Wait for the OpenType SVG format support on all platforms.
    • Do it in javascript like
      • Twemoji "A simple library that provides standard Unicode emoji support across all platforms."
      • EmojiOne "EmojiOne™ is the open emoji standard."

    The latest solution looks the best one for now for a web usage!

提交回复
热议问题