What is causing this error?

(see the transcript file for additional information){E:/MikTeX/fonts/enc/dvips/ fontname/texnansi.enc}
!pdfTeX error: miktex-pdftex (file ugmr8a.pfb): cannot open Type 1 font file for reading
==> Fatal error occurred, no output PDF file produced!

I have the following lines after \documentclass[stdletter]{newlfm} and before \begin{document}:


Exchanging their order or omitting the fontenc line doesn't help. I'm new to LaTeX and I cannot decode log files very well yet.

3 Answers 3


You can get the needed fonts from CTAN.

Probably you need only the fonts themselves (the pfb-files). Put them in a local root in fonts/type1/garamond (see the MikTeX manual). Update the fndb and then try again.

  • Thanks, works great! I will soon add as an answer the process that I followed.
    – Kit
    Sep 18, 2010 at 15:02
  • @ulrike-fischer: I am on a Fedora system with TeXLive 2011 and getting the same error (!pdfTeX error: pdflatex (file texnansi.enc): cannot open encoding file for reading). I have have garamond installed in my system. All the pfb files from your link are in /usr/share/fonts/ I ran the fc-cache command on this directory. I am still getting the error above. Do you have any suggestions?
    – Ariel
    May 3, 2012 at 14:45
  • 1
    @Ariel: You are not getting the same error. Above it says "cannot open type 1 font file". You have "cannot open encoding file". Check if you have texnansi.enc. Also fc-cache has nothing to do with this. May 3, 2012 at 14:49
  • Thanks, where does this texnansi.enc file need to be?
    – Ariel
    May 3, 2012 at 14:58
  • 1
    @Ariel Look at the original question. You can see the path of the texnansi.enc file in a miktex system. May 3, 2012 at 15:02

I had the same problem, ended up here, and Will's answer pointed me to getnonfreefonts. That solved the problem for me. So, for anyone who stumbles here in the future, here is a quick answer:


wget https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
texlua install-getnonfreefonts


curl --remote-name https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
texlua install-getnonfreefonts


getnonfreefonts -a

That installs all the fonts. If you want just want Garamond:

getnonfreefonts garamond

I think the problem is described in the package documentation for mathdesign:

This package alone is useless. You have to install one of the full set of fonts available. Please consult the provided README file. It deals with all the installation and system configuration process.

Do you have copies of the fonts required by mathdesign? (I think the script getnonfreefonts can help.) But from here I can't help you—I haven't installed these fonts before myself.

  • 1
    I followed the instructions in the INSTALLATION section of the mathdesign README, like updmap, etc., but the problem keeps popping up. I downloaded the zip file linked from here. Does that constitute obtaining a copy of the fonts? I actually have a copy of GARA.TTF that comes with (Windows?) or (Office?). How do I make use of it?
    – Kit
    Sep 18, 2010 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .