My Fedora 17 LuaLaTeX (2012) system just keeps complaining about some particular (of course existing) font not existing. It can't spit out any PDF from a TeX file using that font. This is the error I am getting:

!LuaTeX error: cannot find OpenType font file for reading () ==> Fatal error occurred, no output PDF file produced!

I am 100% positive the otf font file exists and that the path I am giving to setmainfont is correct.

After perusing TeX StackExchange searching for help, I couldn't find any recommendation that worked.

Can anyone help?

  • 1
    Hi and welcome to TeX.sx. It's perfectly fine to ask a question and then answer it. This would be preferable to having an answer in the question. So perhaps you can edit your question just showing the error you got originally and then add your own answer as an answer. This way the question doesn't remain perpetually unanswered.
    – Alan Munn
    Jul 28, 2012 at 16:06
  • 1
    Where exactly is the font? And how exactly are you calling it with setmainfont? Jul 28, 2012 at 17:17
  • 1
    Try fclist | grep <fontname> to see whether the font is installed or not. Jul 28, 2012 at 18:36
  • Does running mkluatexfontdb help? Jul 29, 2012 at 15:35
  • I'm afraid I cannot say, Martin. My problems are gone since I deleted the broken .lua files as I explained in my own answer. So trying mkluatexfontdb does nothing now (apart from a trivial information message).
    – escudito
    Jul 29, 2012 at 17:15

1 Answer 1


I just found a solution.

It turned out it was all about cleaning my LuaTeX font cache.

Try that if you face the same problem. Go to your home folder. Activate viewing of hidden files (Ctrl+H). Look for .texlive2012/texmf-var/luatex-cache/generic/fonts/otf and delete the .lua file(s) that more closely match your "existing but not found" fontname.

That did the trick in my case, and forever. I suppose an interrupted PDF compilation was the culprit.

  • Bingo, this answer is a lifesaver. It's important to note that the font you need to delete might be the one just after the ones reported before the fatal error, i.e. it might not be reported in the LaTeX output.
    – E.P.
    Sep 21, 2017 at 21:55
  • This one helped for me as well - I had to delete the entire otl folder though (see also here: tex.stackexchange.com/questions/416183/…) Jan 22, 2020 at 8:35
  • On macOS the relevant path seems to be ~/Library/texlive/2021/texmf-var/luatex-cache/generic/fonts/. Feb 4 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.