Forum โ€บ Bugs

Color Emoji Help

plasmasolutions
Hi guys,

I'm trying to get some emojis into my book, but they show up in black and white.

My css looks like that and I get no errors on building the book, but I unfortunately get only black and white versions of these ๐Ÿค—๐Ÿ™ˆ๐Ÿค๐Ÿฐ๐Ÿ˜ˆ๐Ÿคฉ๐Ÿ™„๐Ÿค‘๐Ÿคจ๐Ÿคญ๐Ÿฆ˜ :

@font-face {
font-family: Emoji;
src: url("../Fonts/TwitterEmoji.ttf") format('opentype');
}

body {
font-family: 'Raleway', sans-serif, Emoji;
font-size: .9em;
line-height: 25px;
font-style: normal;
font-weight: 400;
}

Is there anything that could cause that? I was searching for documentation about this feature, but I didn't found anything except the few posts about emojis that were written in the "black and white" emoji age ;)

I'm using the Twitter Emoji font from https://github.com/eosrei/twemoji-color-font/releases

I would greatly appreciate some help on this topic or pointers to documentation. Thanks for creating this fabulous PDF creator!

Cheers,
Tom
  1. Screenshot from 2020-10-06 19-41-08.png52.1 kB
    The output, bw emojis
mikeday
Prince doesn't support SVG emoji fonts yet, but we've just finished implementing this and will release it soon! In the meantime you could try JoyPixels or Noto Color Emoji.
mikeday
The Twemoji script that replaces emoji characters with SVG should also work:

https://github.com/twitter/twemoji
plasmasolutions
Hi Michael,

thanks for your answer - awesome to hear that you're done implementing exactly what I need (without me actually knowing that ;)). I will wait for this feature to arrive then, it's not super urgent as there is much to write still :)

Thanks also for the second proposal, will try that as well this week.

Have a great day,
Tom
plasmasolutions
Hi Michael,

just to make sure that I did understand you correctly: Noto Color should work, right?

I tried it with the NotoColorEmoji.ttf from https://github.com/googlefonts/noto-emoji/tree/master/fonts but when I execute prince --scanfonts NotoColorEmoji.ttf it throws this warning: prince: NotoColorEmoji.ttf: error: not a TrueType or OpenType font

Which naturally leads to the same warning when I compile the book. Again, not super urgent, but maybe you've got an idea what happens here..

Best,
Tom

Edited by plasmasolutions

mikeday
You will need to use a latest build of Prince.
plasmasolutions
Thanks so much! Worked like a charm!
mikeday
As it happens we now have a new latest build that supports OpenType SVG fonts so the Twitter Emoji font should work now!