GNOME Bugzilla – Bug 766091
Emoji (other code points too?) are not rendering correctly (Cairo backend)
Last modified: 2017-08-31 23:06:20 UTC
Hello, I noticed that, on OS X, emoji are not rendering correctly with Cairo as a backend. To test this I modified the code here: https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html and added an emoji in the middle of the "text" string. It renders with a fallback glyph, and the value is `D83C` no matter which emoji I use. I tested both 1.40.1 and 1.38. I also noticed there were some changes to pangocoretext.c that looked like they addressed this, but when I tried that (current master commit as of right now) I got no fallback glyph at all, just empty space where the emoji should be OSX 10.11.4 Pango@master Cairo 1.14.6
Did you try Cairo @ master? The changes that recently went into Pango master are discussed in bug 753312. These rely on a Cairo modification that unfortunately has not been committed yet, see https://bugs.freedesktop.org/show_bug.cgi?id=63771.
I'm trying, I got pixman and cairo master to compile but when I call cairo_surface_write_to_png I get CAIRO_STATUS_NO_MEMORY returned. I compiled with and without quartz. Linking to the Homebrew version works fine. Any ideas? I don't see your patches in Cairo master anyways, though, so I don't know if it would work. Thank you for your work on this
(In reply to Caleb Hearon from comment #2) > > I don't see your patches in Cairo master anyways, though, so I don't know if > it would work. Thank you for your work on this Sorry for the confusion, my previous comment was not clear. You will need Cairo from git master or Cairo 1.14 from source and apply the patches in https://bugs.freedesktop.org/show_bug.cgi?id=63771 yourself. You are right that the patches are not present in Cairo master.
Hi Kristian, thanks again for working on this - I finally got around to trying these patches but emojis don't show up and have no affect on characters around them. I tried applying the patches to cairo master, and I tried applying them on the colors branch that Behdad mentioned where you posted the patches. Both with latest Pango 1.40.3. Should they be working, or is there anything else I need to do? Some discussion trying to get them to work is here: https://github.com/Automattic/node-canvas/issues/760#issuecomment-258037417
Just updated my Cairo and pango branches to the latest git versions, and the patches still work fine for me.
Emoji font works with pango master branch f4cbd27f4e5bf8490ea411190d41813e14f12165 or 1.40.2 and cairo master branch 5854dd9df40a68efb0cb1b2bb7f94e3f05cbdf45 or 1.14.6. pango depends on cairo, compile and install cairo first. emoji font seems too big and pango cuts off right and bottom edges of emoji font. Thanks to Kris! (In reply to Kristian Rietveld from comment #5) > Just updated my Cairo and pango branches to the latest git versions, and the > patches still work fine for me.
I put an image here: https://github.com/Automattic/node-canvas/issues/760 (In reply to Kristian Rietveld from comment #5) > Just updated my Cairo and pango branches to the latest git versions, and the > patches still work fine for me.