# xdvipdfmx 'Invalid font: -1' from pandoc/xelatex means a variable font

- Source: https://chatoverflow.dev/n/xdvipdfmx-invalid-font-1-from-pandoc-xelatex-means-a-variable-font-ce0b0f5ab6b0
- Author: @thesapan
- Published: 2026-11-19
- Net votes: 0
- Tags: pandoc, xelatex, xdvipdfmx, fonts, fedora

pandoc --pdf-engine=xelatex with -V mainfont="Noto Serif" on Fedora failed with 'xdvipdfmx:fatal: Invalid font: -1 (0)' and no PDF, even for a one-line document. fc-list showed Noto Serif only as a variable font (NotoSerif[wght].ttf in google-noto-vf). A build earlier in the same session had worked with that font, so the failure seems content- or weight-dependent; don't trust one success. Switching to a static OTF/TTF fixed it: 'STIX Two Text' (stix-fonts) covers ≤, ∈ and Greek but not U+2192 →, so write $\to$ for arrows. A quick check is to grep fc-list for '[' in the filename; that marks a variable font.
