mainfontfallback not working anymore after MacTeX 2025 upgrade #11097
-
I loved the option to specify
to get emojis in my PDF. It worked like a charm when I was still using Tex Live 2023, but after updating to Tex Live 2025 (for macOS, i.e., via MacTex) this option suddenly stopped working and the emojis are again gone / replaced by tofu in the PDF output. I'm normally using pandoc through quarto (quarto version: 1.8.21, built-in pandoc version 3.6.3) on macOS 15.6.1. Before updating the Tex distribution it just worked. Now it doesn't but I'm also not getting any errors from quarto. When I try converting a document with my local pandoc installation directly, I get an error (though I'm also not 100% sure my example is correct, just asked ChatGPT for something I could use to test outside of quarto). pandoc version info:
Test markdown file: ---
author: "Test User"
date: "2025-08-31"
from: markdown+emoji
pdf-engine: lualatex
mainfontfallback:
- "Noto Color Emoji:mode=harf"
---
# 🌍 Example Markdown with Emojis 😃
## ✨ Introduction
This document tests emoji rendering when converting to PDF.
We want to see how `--mainfontfallback` handles emojis. 🎨
## 🍔 Food Section
- 🍎 Apple
- 🍕 Pizza
- 🍣 Sushi
- 🍫 Chocolate
- 🍩 Donut
- 🥑 Avocado
## 🎉 Conclusion
Emojis ✅ should be visible in the final PDF.
If not, try different fallback fonts that include emoji glyphs. 🎭 pandoc command I used:
error:
Am I doing it wrong? Or is there anything that changed in lualatex that would explain this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
Try passing (...and typst handles unicode just fine without hacks, so you markdown compiles much faster to PDF with Typst...) |
Beta Was this translation helpful? Give feedback.
-
I tried this in Docker with an up-to-date TeXLive installation, and it worked fine. So I suspect that the problem is with MacTeX. StepsDockerfileFROM pandoc/latex
RUN apk --no-cache add font-noto font-noto-emoji
RUN tlmgr update --self && tlmgr update --all Building the Docker imagedocker build -t pandoc/latex:noto -f /path/to/Dockerfile . Creating the PDFdocker run --rm -it --user $(id -u):$(id -g) -v "$(pwd)":/data pandoc/latex:noto \
test.md --output=test.pdf --pdf-engine=lualatex |
Beta Was this translation helpful? Give feedback.
-
I was able to reproduce this (on a mac, but not using MacTeX - rather latex from nix). I found that adding |
Beta Was this translation helpful? Give feedback.
If you are using Quarto, why not use TinyTeX https://yihui.org/tinytex/, it should work really well with Quarto (it can be installed with
quarto install tool tinytex
), and if you add a few more packages with tlmgr works well with Pandoc. I used TinyTeX on a Mac and your markdown compiles to a PDF with emojis intact. I replaced "Noto Color Emoji" with "Apple Color Emoji", added amainfont
and used this command:pandoc --verbose -s --pdf-engine lualatex -o uni.pdf uni.md
TinyTeX 2025.08 uses this version of LuaLaTeX: