astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.19k stars 176 forks source link

Generated PDF only renders shapes of emojis (on Linux) #200

Closed DenizThatMenace closed 4 years ago

DenizThatMenace commented 4 years ago

I created a very simple reveal.js presentation containing emojis (using the "Noto Color Emoji" font, which is the default emoji-font in Chrome/Chromium).
It looks like this:

Presentation

When using Decktape to generate a PDF from the presentation, the resulting PDF looks as it should when displayed using browsers (Chrome, Chromium, Firefox, Edge) but using "normal" (Linux) PDF-viewers (as e.g. evince) the resulting PDF looks quite weird:

Weird Presentation

Only the shapes of the emojis are displayed but not the colors on top.

When looking at the embedded fonts, the PDF-viewer (evince) tells me that all fonts are embedded, but the names seem to be unrecognizable (and the encoding probably unknown):

List of embedded fonts

I am not sure if this is just a problem with the PDF viewers I tried under Linux (evince) or the backend-library (cairo?) used by it (see https://victor.kropp.name/blog/emoji-on-linux/) or if decktape does not embed the emoji fonts properly.

Maybe you could give me a hint?

astefanutti commented 4 years ago

Emojis should be working with Decktape. To find out whether it's caused by Decktape or the reader, could you please print the slide with Chrome or your Web browser and open the exported PDF?

DenizThatMenace commented 4 years ago

Emojis should be working with Decktape. To find out whether it's caused by Decktape or the reader, could you please print the slide with Chrome or your Web browser and open the exported PDF?

That is a good idea.

When printing the slides with Chrome the resulting file looks fine when displayed with Chrome or another browser, but looks weird again with the native PDF viewer (evince). The names of the embedded fonts are missing again, though.

So, I guess, Decktape is doing everything correct and only the PDF viewer has problems displaying the emojis correctly.

Thank's for your help! :nerd_face:

astefanutti commented 4 years ago

Thanks for the feedback. Another test is to open the PDF with Acrobat Reader if you have it installed, as it is supposed to follow the PDF spec closely.

DenizThatMenace commented 4 years ago

A colleague of mine did this. (I do not have Adobe Reader installed.)
It looked just fine there, too.

So, I do assume that Decktape is just doing it right and evince has some problems.

I already created a bug-report in the issue-tracker of evince: https://gitlab.gnome.org/GNOME/evince/issues/1300

elliot-sawyer commented 3 weeks ago

I added some extra info about this over here: https://github.com/astefanutti/decktape/issues/209#issuecomment-2387696684

Here's a sample page in Chromium: image

Here's the same page produced as a PDF with Linux Document Viewer: image

But if I view the same PDF in Edge, Chromiuim, or Firefox, it renders correctly: image

I'm mainly leaving this comment here, as a reminder that the software you're using the view the PDF's matters