[texhax] How to getnonfreefonts?

Reinhard Kotucha reinhard.kotucha at web.de
Thu Apr 15 22:17:41 CEST 2010

On 14 April 2010 Brandon Kuczenski wrote:

 > Hey everyone,
 > Sorry to ask a question that seems to come up frequently, but the font 
 > system does seem to be robust against easy explanation.

You are the first one who reports this problem.
 > I was overjoyed to see the invention of 'getnonfreefonts' as a way
 > to automate the installation of some common [though
 > undistributable] fonts.  I seem to remember being awestruck by its
 > simplicity of use when I used it in the past to install arial-urw.

Glad to hear this.

 > However, this morning, on my up-to-date texlive system, I tried to install 
 > garamond with: getnonfreefonts garamond;  it went through all the 
 > motions, downloaded and extracted the files, ran updmap and so on, and 
 > completed without errors.  But when building a LaTeX document, with 
 > \renewcommand{\rmdefault}{ugm}, dvips outputs a lot of lines like:
 > mktexpk: don't know how to create bitmap font for ugmr8r.
 > dvips: Font ugmr8r not found,  using cmr10 instead.
 > then dvips terminates with:
 > dvips: ! invalid char 150 from font ugmr8r
 > My missfont.log:
 > mktexpk --mfmode ljfour --bdpi 600 --mag 2+44/600 --dpi 1244 ugmr8r
 > mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 ugmr8r
 > mktexpk --mfmode ljfour --bdpi 600 --mag 1+264/600 --dpi 864 ugmr8r
 > mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 ugmri8r
 > mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720 ugmri8r
 > I observed that in $HOME/texmf I have a copy of ugmr8r.tfm.  I also have 
 > ugm* files of type tfm, afm, pfb, map, and vf.

Sorry for the late response.  I tested it last night myself and it
works here as expected.  Since you said thet getnonfreefonts installed
ugm.map already, this error indicates that the content of ugm.map
isn't copied to psfonts.map.  Without these entries dvips assumes that
it's a bitmap font and the mktexpk script invokes Metafont.

Installing the .map files is done in two steps.  When a particular font
is installed, the name of the .map file is added to updmap.cfg.
Finally updmap is run in order to create psfonts.map and pdftex.map by
concatenating all the .map files mentioned in updmap.cfg.

First, locate the updmap.cfg file which TeX is actually using:

kpsewhich updmap.cfg

Then check whether this file contains this entry:

Map ugm.map

If not, the first step failed.  Otherwise locate psfonts.map

kpsewhich psfonts.map

and check whether it contains:

ugmr8r GaramondNo8-Reg " TeXBase1Encoding ReEncodeFont " <8r.enc <ugmr8a.pfb
ugmm8r GaramondNo8-Med " TeXBase1Encoding ReEncodeFont " <8r.enc <ugmm8a.pfb
ugmri8r GaramondNo8-Ita " TeXBase1Encoding ReEncodeFont " <8r.enc <ugmri8a.pfb
ugmmi8r GaramondNo8-MedIta " TeXBase1Encoding ReEncodeFont " <8r.enc <ugmmi8a.pfb

If both files are ok, I can't explain the error messages you get.

You get more verbose output if you say:

getnonfreefonts --verbose --force garamond

Maybe it helps you to detect the problem.  I can't reproduce the
behavior you reported myself.

 > I tried to run getnonfreefonts-sys, using the -f option, but that
 > didn't have any effect (it downloaded and installed the font again,
 > but the problem persists).  Moreover, the fonts were not installed
 > system-wide- they remain only in my $HOME/texmf tree.  This is all
 > utterly mysterious to me.

Well, you can run getnonfreefonts[-sys] with either the --help or the
--lsfonts option.  In both cases it shows you where it would install
the fonts.  getnonfreefonts installs fonts in TEXMFHOME and
getnonfreefonts-sys installs them in TEXMFLOCAL.  Definitely.

 > what am I missing?

The problem is that udmap (without -sys) copies its config file to
TEXMFCONFIG and since it comes first in the search path, the file in

Thus, once you run getnonfreefonts, fonts installed by
getnonfreefonts-sys are invisible to you, but other users can still
use them (unless they ran getnonfreefonts themselves before).

TeX Live developers are aware of this problem but providing a better
solution means writing updmap from scratch.  This is on the agenda but
it's still unclear when it will happen.

On 15 April 2010 Ulrike Fischer wrote:

 > Something did go wrong at the updmap-step. The map hasn't been
 > enabled properly. The most frequent cause of this problem is using
 > sometimes updmap  and sometimes updmap-sys which leds to two sets of
 > map-files and dvips is using one while you are updating the other. 

AFAIK, this can't happen.  getnonfreefonts calls updmap and
getnonfreefonts-sys calls updmap-sys.  A user can't do anythything
wrong.  But since Brandon ran getnonfreefonts before
getnonfreefonts-sys, I think we can ignore the -sys stuff for the time
being.  It doesn't (or shouldn't) interfere with the per-user files.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list