I am trying to house all my customizations and fonts in an asset folder so I can use it on multiple documents and maintain the same styles. Unfortunately whenever I try and put the fonts into a path two levels deep I can't compile the document. I get the error:
! error: (type 2): cannot find file ''
! ==> Fatal error occurred, no output PDF file produced!
Below works:
\newcommand{\fontmercury}{\setmainfont[Path = ./fonts/,
BoldFont=mercurybd.ttf,
ItalicFont=mercuryi.ttf,
BoldItalicFont=mercurybi.ttf
]{mercury.ttf}
}
This does not work:
\newcommand{\fontmercury}{\setmainfont[Path = ./assets/fonts/,
BoldFont=mercurybd.ttf,
ItalicFont=mercuryi.ttf,
BoldItalicFont=mercurybi.ttf
]{mercury.ttf}
}
The path is correct, it just generates an error anytime I go more than one level deep.
EDIT: I figured it out. It was the cache problem discussed here. Deleting the otl folder in my case allowed it to compile. LuaTeX cannot find existing font