13

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}:

\usepackage[urw-garamond]{mathdesign}
\usepackage[T1]{fontenc}

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.

Kit
  • 16,430

3 Answers3

10

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.

Caramdir
  • 89,023
  • 26
  • 255
  • 291
Ulrike Fischer
  • 327,261
  • Thanks, works great! I will soon add as an answer the process that I followed. – Kit Sep 18 '10 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 03 '12 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. – Ulrike Fischer May 03 '12 at 14:49
  • Thanks, where does this texnansi.enc file need to be? – Ariel May 03 '12 at 14:58
  • 1
    @Ariel Look at the original question. You can see the path of the texnansi.enc file in a miktex system. – Ulrike Fischer May 03 '12 at 15:02
  • @UlrikeFischer: A follow up: Via D.Carlisle, found that texnansi.enc resides in /fonts/enc/dvips/ly1 (and not in the /fonts/enc/dvips/urw (as suggested by the path in the original question). However, putting texnansi.enc in /ly1 does not get rid of the error. D.Carlisle suggested putting texnansi.enc in the local directory where I was compiling from. This solved the issue. I looked at your answer to a similar question here. Unfortunately I can't find ly1 or texlive-fonts-extra from the repository through yum. They could be outdated. – Ariel May 04 '12 at 13:17
  • Additional comments from D.Carlisle: "...texnansi was Y&Y's font encoding which got called LY1 (by me as it happens) when latex support was added. You probably don't want that these days and can use T1 encoding? texnansi is the ly1 support file, of course it may be that some encoding fines refer to each other (texnansi was basically a non standard version of latin1 just as the corresponding windows code page is a non standard version of the iso standard)" – Ariel May 04 '12 at 13:27
5

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:

(Linux)

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

(macOS)

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

Then

getnonfreefonts -a

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

getnonfreefonts garamond
Jason
  • 163
3

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 '10 at 14:24