Closed jmgirard closed 2 years ago
This may be a Windows-specific thing. My friend tried it on Mac and retained the colors.
I don't think this is something specific to xaringan. It will be the same with html_document
---
title: "test emoji"
output: html_document
---
These are emoji : ๐ท ๐๏ธ ๐ ๏ธ
It is highly possible that this is OS specific because emojis used here are fonts. And fonts is often OS specific. Or it could also be browser specific like differences between Safari and Chrome.
A possible workaround for you would be to use image emoji, but this is not yet something available from R directly (for example see https://github.com/hadley/emo/issues/29). The JS lib twemoji that offers this would need to be used directly.
Otherwise, you may consider fontawesome icon for example, or other set of icons. There are a few package that helps with this, and includes those icons as image too.
Anyway, I am not sure there is anything we can do in xaringan or rmarkdown about this.
Thanks for looking into it.
When I add emojis to my presentation and open it in Chome, they render nicely in color. But when I try to print it (to create a PDF file), they lose their color and render as white outlines. I suspect this has something to do with the device CSS changing fonts or something. Is there a way to prevent this replacement from happening (e.g., perhaps via CSS)? Or is there some better way to generate a PDF file for my presentation?
Appearance of emojis when viewed in Chrome
Appearance of emojis when printed from Chrome