Forum Bugs

Emoji missing in pdf but shows in image render

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
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 you will see it is a single byte character, and in 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

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:

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:
Is this related to 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.
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?