Search code examples
ubuntupuppeteerchromium

Puppeteer failed to render emojis when running in Ubuntu


I have a script that uses puppeteer to take screenshot of DOM components and outputs an image. Everything works fine on MacOS but when I run this on Ubuntu the emojis become a rectangle. Does anyone know why is this happening?

  • MacOS: (where you can see a rocket emoji)

https://i.sstatic.net/HeCEf.png

  • Ubuntu: (emoji becomes a rectangle)

https://i.sstatic.net/v1qyV.png


Solution

  • Multiuple sources (1, 2, 3) suggest using fonts-noto-color-emoji font to remedy this on Ubuntu:

    sudo apt install fonts-noto-color-emoji
    

    Update: it is possible to do so starting with Ubuntu 18.04