Forum Bugs

Emoji missing in pdf but shows in image render

daneren2005
bin/prince emoji-test-case.html -o output.pdf --raster-output=output-%d.png
```
prince: font 'Noto Color Emoji, Regular': warning: glyph 3: bitmap missing
prince: font 'Noto Color Emoji, Regular': warning: glyph 168: bitmap missing
```

If you run this you can see that the pdf is just missing the heart but the rendered PNG has it. If you open this in Chrome it is showing that it is pulling from the Noto Color Emoji font.
  1. emoji-test-case.html1.1 kB
daneren2005
This appears to be an issue with old single byte emoji vs newer (relatively, Unicode 4.0 is old as dirt as well) two byte emojis. If you search for that heart in http://unicode.org/Public/emoji/3.0/emoji-data.txt you will see it is a single byte character, and in http://unicode.org/Public/emoji/4.0/emoji-data.txt it changed to a two byte character with color. Since Chrome renders these older versions of these emoji fine, we would need Prince to do the same for consistency.

Edited by daneren2005

daneren2005
To add to this, I have also found some other Emoji that display in browser AND rastered outputs, but not for pdf outputs. Here are just a couple of examples:

https://www.emojiall.com/en/code/1FAF2
🫲

https://www.emojiall.com/en/code/1FAE0
🫠

I've only spot checked, but the second batch of broken emoji all appear to be from the Unicode 14 standard. I am using the latest version of Noto Color Emoji which supports them: https://github.com/googlefonts/noto-emoji/releases/tag/v2.034.
daneren2005
Is this related to https://www.princexml.com/forum/topic/4552/emoji-rendering-bitmap-missing-for-glyph-1? I had forgotten about this post in the past. It looks like the first issue with single byte emoji can be fixed by just adding the second byte manually. For the second issue with Unicode 14 emoji, I have not been able to figure out how to get them to render correctly.
mikeday
Noto Emoji appears to display U+1FAF2 LEFTWARDS HAND in black and white, possibly because its primary intended purpose is ligating with other emoji to construct handshakes, I think?

https://emojipedia.org/leftwards-hand/