Should mention we are considering adding this to DocRaptor by detecting HTML entities in source and then doing a replacement with font fallback, which is prone to error, but better than not having it.
You are technically correct. The main issue is that browsers/OSes are cheating right now. If I throw the HTLM below in a file and open it in a browser (on OSX, and I suspect iOS), it will render an emoji cat. Prince will just throw out a: "prince: warning: no glyphs for character U+1F638, fallback to '?'".
Input:
<p style="font-family: Arial">😸<p>
Not sure what the right answer is, but certainly it is confusing for users that something that just works in browsers doesn't work in Prince (or wkhtmltopdf for that matter).
Presumably because in our default fonts.css we don't mention any emoji fonts. We would need to find a suitable font for each of the major platforms we support (MacOS X, Windows, Linux), or customers can use their own if they have one.
OSX (since ~2009) includes "Apple Color Emoji". Windows seems to be "Segoe UI Emoji". Linux (at least Ubuntu 14) doesn't seem to have a built-in one, but the "ttf-ancient-fonts" package includes a font called "Symbola" that inludes emoji.
This thread looks very helpful. I'm currently getting the errors:
prince: warning: no glyphs for character U+1F618, fallback to '?' prince: warning: no glyphs for character U+1F609, fallback to '?' prince: warning: no glyphs for character U+1F61A, fallback to '?' prince: warning: no glyphs for character U+1F48B, fallback to '?' prince: warning: no glyphs for character U+1F605, fallback to '?'
I'm on mac, and those are emoji icons. Not sure I'm following how to get this to work. Thanks so much for your help.
That means the font does have entries in the charmap for the emoji characters, but it may not have regular monochrome glyphs for them, and Prince doesn't support color fonts yet. To get full color emojis may require using some JavaScript to replace them with little images or something like that, until we can support emoji fonts.