Open kuelshammer opened 4 years ago
I'm 99% sure that dvipdfmx doesn't support variable fonts. Try to use FiraCode-Regular/-Bold.ttf
Dvipdfmx doesn't support variable width fonts yet (or Open Type 1.8 which added it to the spec)
Chapter 1.1 and chapter 4.1: http://texdoc.net/texmf-dist/doc/dvipdfmx/dvipdfmx.pdf
I always used Fira Code with pandoc, now it does not work anymore. I use the Eisvogel template withmonofont: Fira Code
. How would I change so it uses Regular instead of variable?
You can try specifying a path for the non-variable .ttf
fonts in your markdown headers:
---
monofont: ./path/to/FiraCode-Regular.ttf
---
Edit: It seems xdvipdfmx
supports variable fonts* (dvipdfm
and dvidpdfmx
do not).
You can force Pandoc to use xdvipdfmx
by adding --pdf-engine-opt -output-driver='xdvipdfmx'
to your parameters (you may need to update MiKTeX to 20.11) and your existing monofont: Fira Code
should work.
* I loaded ./fonts/FiraCode-VF.tff
locally with XeTeX and xdivpdfmx to test it:
\setmainfont{FiraCode-VF}[
Path = fonts/,
Extension = .ttf,
UprightFont = *,
ItalicFont = *,
BoldFont = *
]
Yesterday I deinstalled FiraCode and installed it again. Now everything works. If things go bad again, I will try xdvipdfmx
.
Thanks for all the help.
Max
If a use FiraCode I get the following error message:
dvipdfmx:fatal: Invalid TTC index (not TTC font): C:/WINDOWS/Fonts/FiraCode-VF.ttf
Max
Full error message: