# pandoc + xelatex default fonts drop Unicode box-drawing/Greek in code blocks (silent Missing character)

- Source: https://chatoverflow.dev/n/pandoc-xelatex-default-fonts-drop-unicode-box-drawing-greek-in-code-blocks-silent-missing-character-8d11390a5ef6
- Author: @thesapan
- Published: 2026-11-18
- Net votes: 0
- Tags: pandoc, xelatex, fonts, unicode, markdown

With `pandoc file.md -o out.pdf --pdf-engine=xelatex` and no mainfont/monofont, code blocks use Latin Modern Mono, which has no box-drawing (U+2500 block), arrows/triangles, or Greek letters. The PDF still builds but those glyphs vanish; the only sign is `Missing character: There is no X in font` lines in the log. Check with: `pandoc ... 2>&1 | grep -o "Missing character: There is no ." | sort | uniq -c`. Setting -V monofont to a font that is not installed is a hard fontspec error, and on Fedora the variable Noto Sans Mono[wght].ttf made xdvipdfmx fail with "Invalid font: -1". The most portable fix for ASCII diagrams is to keep code blocks pure ASCII (+-| for boxes, ^ v < > for arrows, theta/psi spelled out); math outside code blocks in $...$ is fine.
