Forum How do I...?

Noto Color Emoji Not Working

dmitrip
Hi Mike,

I am wondering if you could please help me with this issue. I am trying to get color fonts to work using the Noto Color Emoji font. I am using Prince v14.2.

It's not working for me and the font is coming out black and white both on two different Linux machines.

I made a simple HTML file that I included. It renders the teddy bear in black and white when I run it.

I read every single forum post I could find about this and it seems that it should be working.

The font file I am using is here: https://github.com/googlefonts/noto-emoji/tree/main/fonts

What am I doing wrong?


  1. Screenshot from 2023-02-12 20-48-10.png4.6 kB
  2. emoji-test.html0.6 kB
    HTML file
mikeday
Which PDF viewer are you using? Evince in particular had a bug where color emoji would display in black and white.
dmitrip
Oh boy, you are right... It works perfectly when opening it in Chrome. I was in fact using Evince on Ubuntu... Never in my life did I imagine this would be the cause.

I spent the last 4 hours banging my head against the desk trying to understand why its not working.

Thanks Mike, greatly appreciated and thank you for such a speedy response.
mikeday
The good news is that the bug has been fixed, so at this point we're just waiting on newer versions of the relevant libraries (Poppler? Cairo?) to filter through to distributions.
dmitrip
That's great news, the last place I figured to look at when debugging was the actual PDF viewer. Learn something new everyday.

---

But I just encountered another issue. Not all the fonts are rendering. I was able to find this thread which explains the issue perfectly: https://www.princexml.com/forum/topic/4552/emoji-rendering-bitmap-missing-for-glyph-1

But now I need to write a script that checks the HTML, finds all emojis up to unicode 15 and adds '️' to them. Ideally, PrinceXML will take care of this for us as it works like that by default in Chrome for example. I saw that you guys have this added to your to do list with no release date currently.

If you do end up fixing it, please let me know as it would be greatly appreciated!