Open n1trux opened 4 years ago
I've found a workaround for this if you're willing to use lualatex:
header-includes:
- |
\directlua{luaotfload.add_fallback
("emojifallback",
{
"Twemoji Mozilla:mode=harf;script=DFLT;"
}
)}
---
`\renewcommand{\familydefault}{\sfdefault}`{=latex}
`\setmainfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex}
`\setsansfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex}
@jan-walther Do you have a working example .md
file with this?
---
header-includes:
- |
\directlua{luaotfload.add_fallback
("emojifallback",
{
"Twemoji Mozilla:mode=harf;script=DFLT;"
}
)}
---
`\renewcommand{\familydefault}{\sfdefault}`{=latex}
`\setmainfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex}
`\setsansfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex}
🚀 🌑
This is the test file I have been using. I get this:
√ ; pandoc test.md -o test.pdf --from markdown --template eisvogel --listings --pdf-engine=lualatex
Error producing PDF.
! ==> Fatal error occurred, no output PDF file produced!
✗ 43 ;
--- header-includes: - | \directlua{luaotfload.add_fallback ("emojifallback", { "Twemoji Mozilla:mode=harf;script=DFLT;" } )} --- `\renewcommand{\familydefault}{\sfdefault}`{=latex} `\setmainfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex} `\setsansfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex} 🚀 🌑
This is the test file I have been using. I get this:
√ ; pandoc test.md -o test.pdf --from markdown --template eisvogel --listings --pdf-engine=lualatex Error producing PDF. ! ==> Fatal error occurred, no output PDF file produced! ✗ 43 ;
Hi, did you install the Mozilla Emoji font on your system? I've only tried it on Mac OS so far using this font: https://github.com/mozilla/twemoji-colr
Package Arch Version Repository Size
Installing:
texlive-twemoji-colr noarch 11:svn64854-69.fc39 fedora 1.4 MiB
twitter-twemoji-fonts noarch 14.0.2-4.fc39 fedora 3.1 MiB
Installing those two solved it.
@jan-walther Thank you!
--- header-includes: - | \directlua{luaotfload.add_fallback ("emojifallback", { "Twemoji Mozilla:mode=harf;script=DFLT;" } )} --- `\renewcommand{\familydefault}{\sfdefault}`{=latex} `\setmainfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex} `\setsansfont{sourcesanspro}[RawFeature={fallback=emojifallback}]`{=latex} 🚀 🌑
Had to add a line for Emoji support in mono-text blocks:
`\setmonofont{sourcecodepro}[RawFeature={fallback=emojifallback}]`{=latex}
.. Thanks, @jan-walther! Your solution works well!
Here's an example of a spec file for our internal ISMS which throws a lot of errors because unicode symbols are not supported:
I suggest using something like texlive-emoji (https://www.texlive.info/CTAN/macros/luatex/latex/emoji/emoji-doc.pdf) for full unicode symbol support.