Forum Bugs

No glyph for Sparkling Heart

daneren2005
"Mon Apr 25 19:53:12 2016: warning: no glyphs for character U+1F496, fallback to '?'"

http://www.fileformat.info/info/unicode/char/1f496/index.htm

I was not really sure whether to file this under bugs or feature requests. When looking up this error I see other places where it was just a matter of not including the correct font packs, but I am not really sure that applies here. Is this part of a font? If so, which? Can Prince be updated to include some special characters such as this which aren't really a part of any font? Or can you point me to what font I need to include to have things like this work as a fallback renderer for these?
mikeday
This character will be supported by an emoji font presumably, but I'm not sure which one. Prince doesn't support color fonts yet, so if you need colorful emoji it will be necessary to replace this character with an image.
daneren2005
I was able to get it working by downloading a black/white emoji font https://www.google.com/get/noto/#emoji-qaae. I then defined in css:

@font-face {
	font-family: 'Emoji';
	src: local('Emoji'), url('font/NotoEmoji-Regular.ttf') format('truetype');
}

body {
	font-family: open sans, emoji;
}


I wish Google would add fonts like that to their Google Font sets so I didn't have to self-host, but oh well. It might also be worth your time to embed something like this as a fallback for Prince since I imagine as emoji gets more common I won't be the only one requesting this. Thanks for pointing me in the right direction.

PS: It's not a big deal to me, but if you ever get colored font support let me know so I can update to a colored set!
jerkob
In case other folks are looking for solutions to emoji, I was able to get monochrome emoji working by installing the EmojiOne "SVG in OT" font (https://www.emojione.com/developers/download; direct link https://github.com/emojione/emojione/blob/master/extras/fonts/emojione-svg.otf) and then updating Prince's fonts.css with:

/* emoji font */
@font-face {
    font-family: sans-serif;
    src: prince-lookup("EmojiOne")
}



This is on CentOS 6.8 with Prince 10.
daneren2005
Was color emoji support ever added or planned to be added?
mikeday
It is planned to be added; might take a little while though as there are four different formats for representing them. In the meantime you can perhaps replace them with SVG or PNG images.
beaugunderson
Emoji One is no longer open source so I'm attempting to use Noto Emoji. It works, and I get black and white emoji, but variation selectors still appear as question marks. Many emoji consist of a codepoint followed by a variation selector, so in the output I see an emoji followed by a question mark.

Is there a way I can suppress those question marks from appearing?
beaugunderson
Ah, if I instead use "twemoji-color-font" everything works. :) (despite the name it also contains black and white emoji)
daneren2005
Were you able to get it to display in black and white in the browser as well? I was originally using Noto Emoji because they had a pack that was black and white only for both browsers and Prince rendering, but it is increasingly getting out of date and I keep having users put in stuff I don't support. If I use "twemoji-color-font" it has a much better distribution of emojis, but it gives the user the false impression that they will get a color emoji from the render :(
hallvord
Might it work to apply a

filter: greyscale(100%);

CSS styling to that text to help the user see what the output is going to be?

Announcement: repos for tests/utils