[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: TeX fonts



Lo, on Tuesday, July 24, Dave Sherohman did write:

> I've finally gotten around to learning some TeX and I'm having a terrible
> time with fonts:
> 
> First I looked at the Gentle Guide's list of 'normally available'
> fonts and grabbed the biggest Roman I could find, only to be told
> "! Font \sf=CMR17 not loadable: Metric (TFM) file not found."

As you say later on, that's likely a case-sensitivity issue.

> Let's see...  `pinfo tex`.  That's astoundlingly non-helpful.  It tells
> what TeX does in general terms, but says nothing at all about what
> symbols TeX recognizes or how it's configured.

If your system is set up like mine, then this actually gets you a page out
of the texinfo documentation, which is not at all what you want.  The TeX
manpage refers to an info document, but I couldn't find one of these.  The
TeX and LaTeX manpages contain some references to some pretty good books on
the subjects, as does
<file:/usr/share/doc/texmf/latex/latex2e-html/refs.html> (installed as part
of the tetex-doc package).  It's highly unfortunate that the best
documentation for this system is not cheaply available.

> OK, `man tex`...  That's a little more useful, but not much.  Find
> texfonts.map, grab a random font out of one of the files it includes...
> No TFM for that either.

Yeah, it appears that texfonts.map only defines aliases for existing fonts,
rather than listing all of the fonts in the system.
 
> Well, then.  `find / -name *.tfm`.  Try
> /usr/share/texmf/fonts/tfm/monotype/helvetic/arr10u.tfm.  tex runs fine...
> But wait - what's this?  Now dvips dies with "dvips: Font arr10u not
> found,  using cmr10 instead."

Yeah, this gets confusing.  TeX just needs the .tfm file, which basically
tells it how tall and how wide each letter is, as well as how far below the
baseline it extends.  There's also some ligature and kerning info (how TeX
turns fi into one character, for instance), but that's it---no information
about what the letters actually *look* like.  This info (typically in the
form of a bitmap) is only of use to the DVI drivers, those programs which
translate from DVI to whatever other form of output, like PS or PDF.  Here,
your DVI driver is `dvips'.  See its info page (which is more complete than
TeX's) for more information.

I'm not sure exactly what the deal is with arr10u; I can't find the
corresponding bitmap on my system.  <shrug>  So, anyway, TeX finds the TFM,
but dvips can't find the bitmap to render the individual letters, so it
gives up and falls back on the default font.

> This error message may have given me the thought to try cmr17 instead
> of CMR17, which does work (although it looks almost as bad as cmr10),
> but it still doesn't provide any hints towards finding out what fonts
> are available (and usable) on my system.  Where is that information?

Hm.  When you say that cmr17 looks almost as bad as cmr10, what exactly do
you mean?  Do you mean that you don't like the fonts very much, or is it
something else?  

If it's an issue with how the fonts are being rendered, how are you viewing
the output?  xdvi?  ghostview?  gv?  or did you print it?  Did you put TeX
into an appropriate mode for your output device?  (This last one is a tad
unfair, as I don't know that it's mentioned in any of the documentation.
Run texconfig as root, select `mode', and choose your printer.  You may
also want to select `rehash' from the main menu after you've done this
part.)

There are a number of postscript fonts provided with dvips that you can use
in TeX.  As you have discovered, though, finding them is the trick.
Check out psfonts.map, from the tetex-base package.  In potato, at least,
there are two copies: one in /usr/share/texmf/dvips/base/psfonts.map, and
the other in /etc/texmf/dvips/psfonts.map.  They appear to be identical.
(I found this documented, if sparingly, in the LaTeX Companion, by
Goossens, Mittelbach, and Samarin; ISBN 0-201-54199-8, section 11.9.1.)

LaTeX actually makes this a whole lot easier, because it's provided some
packages which do all of the font manipulation for you.  When I'm working
in LaTeX, I usually stick

\usepackage{palatino}
\renewcommand{\ttdefault}{cmtt}

in the preamble.  This uses the palatino font for the normal body font, and
sets the default typewriter font back to Knuth's Computer Modern
Typewriter.  (I don't like Courier very much.)

Et voila.  See /usr/share/texmf/tex/latex/psnfss/*.sty for some other
possibilities in LaTeX; also see the LaTeX Companion, section 11.9.

HTH,

Richard



Reply to: