astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.2k stars 177 forks source link

Emojis are missing from bold text and headings in PDF #296

Open Graumagier opened 1 year ago

Graumagier commented 1 year ago

When converting some reveal.js slides to PDF decktape is not including some emoji in headings as well as in bold text. I go from Markdown to Quarto (reveal.js) to decktape with decktape -s 1422x1067.

I've attached some minimal examples (HTML generated by Quarto and final PDF out of decktape).

I've also found When exporting to screenshots, emojis are missing in titles #209 which might be related, although there the issue only seems to occur in (image) screenshots.

Thanks!

emojis_minimal.pdf emojis_minimal_html.zip

MarkusTiede commented 1 year ago

Would be great if this could be fixed; also happening here - if you need additional information, just reply.

Avoiding bold emojis e.g. is an easy workaround.

Might also be an alternative: https://www.bannerbear.com/blog/how-to-get-puppeteer-to-display-emojis/

bungeman commented 2 months ago

This is tracked at Character disappears when printing an SVG and should be fixed with [pdf] Reduce drawing glyphs as paths which is in Chrome 130.0.6697.0 and later. After Puppeteer gains support for Chrome 130 and then rolled into decktape (something like https://github.com/astefanutti/decktape/commit/05eb62063fe70947a203bcb3438b32325c629d0f) then this should be fixed.

astefanutti commented 2 months ago

@bungeman thanks, that's very useful. I'll make sure we upgrade to Chrome 130 once it's supported by Puppeteer.