# LaTeX: fonts for dummies?

I've been using TeX for about 20 years, and I'm now trying to learn LaTeX. Fonts have always been the trickiest part of TeX/LaTeX for me, and I'm completely lost. I tried to follow this guide ftp://ftp.dante.de/tex-archive/info/tex-font-errors-cheatsheet/tex-font-cheatsheet.pdf which looks pretty awesome, but while it might help me figure out what I'm doing wrong, it doesn't help me figure out how to do it right instead.

# Question 1

I set up these commands

\usepackage{bookman}


LaTeX has decided that it wants to use a font named pbklc7t. I have two files:

/usr/share/texmf/fonts/tfm/adobe/bookman/pbklc7t.tfm


but apparently, that isn't enough to actually generate a font.

mktexpk: don't know how to create bitmap font for pbklc7t.


I checked my various map files and I don't have any references to pbklc7t . I do see references such as

dvipdfm.map:  pbkd8r 8r ubkd8a
psfonts.map:  pbkd8r Bookman-Demi "TeXBase1Encoding ReEncodeFont" <8r.enc
pdftex.map:   pbkd8r URWBookmanL-DemiBold "TeXBase1Encoding ReEncodeFont" <8r.enc <ubkd8a.pfb


So apparently I'm missing and/or can't find the files I need for pbklc7t to populate the appropriate map files to use this font.

What is my next step? Either, where do I find the files I need for pbklc7t or how do I convince LaTeX to use one of the pbk fonts that I actually have?

# Edit

Following @egreg's suggestion, I get this:

INPUT /usr/share/texmf/tex/latex/psnfss/ot1pbk.fd
OUTPUT test.dvi
INPUT test.aux


I don't get all of the extra lines with the .vf file or the .map file or the pbkl8r.tfm file.

# Question 2

(This has been updated, so some of the comments may be out of date)

In the past, I've been fond of a font called cmdunh10 . So I tried that instead.

\usepackage[T1]{fontenc}


I'm not getting my small caps. I get these messages instead:

LaTeX Font Warning: Font shape T1/cmdh/m/n' in size <28> not available
(Font)              size <29.86> substituted on input line 23.
LaTeX Font Warning: Font shape T1/cmdh/m/sc' undefined
(Font)              using T1/cmdh/m/n' instead on input line 23.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.


It looks to me like Font shape 'T1/cmdh/m/sc' undefined means "no small caps available."

Further, I thought mktexpk was supposed to figure out how to take my fonts and generate them in the size I want, but I'm getting 29.86-pt instead. Why isn't that happening?

Is it possible that the cmdh font does not have small caps? Is there a way that I can determine that a font does/doesn't have small caps?

• You shouldn't show only snippets, show complete examples. Your first example with pbk should work fine, probably you need to update your map-file. The family name for cmdunh10 is cmdh not cmdunh. – Ulrike Fischer Jun 6 '17 at 19:37
• also \textsc takes an argumnet so presumably \textsc MyName should be \textsc{MyName} (or it will only apply to M) – David Carlisle Jun 6 '17 at 19:45
• BTW to save yourself some time, you should know that you can use XeTeX/LuaTeX (either the plain or LaTeX versions), in which font selection is much simpler: you can use any font installed on your system and usable in other modern applications, with just \newfontfamily\curlyfont{Zapfino} or similar, after a \usepackage{fontspec}. This typically means you can only use "modern" (OpenType) fonts rather than older TeX-specific fonts, but overall for most people this is a great thing. – ShreevatsaR Jun 6 '17 at 19:45
• @UlrikeFischer -- it should work fine. It doesn't. Updating my map files did not add the pbklc7t entries. That's why I'm here. But I'll try to generate a complete example. Thank you for the cmdh tip. I made a little bit of progress there and updated my question. – hymie Jun 6 '17 at 20:03
• There is never a entry for pbklc7t in a map file. 7t is only an intermediary file, the map file contains map entries for raw fonts. – Ulrike Fischer Jun 6 '17 at 20:49

# Question 1

If I run pdflatex on

\documentclass{article}

\usepackage{bookman}

\begin{document}

\end{document}


with the option -recorder, the system produces a file with extension .fls that contains, among other information,

INPUT /usr/local/texlive/2017/texmf-dist/tex/latex/psnfss/ot1pbk.fd
INPUT /usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdftex.map
INPUT /usr/local/texlive/2017/texmf-dist/fonts/enc/dvips/base/8r.enc
INPUT /usr/local/texlive/2017/texmf-dist/fonts/type1/urw/bookman/ubkl8a.pfb


The file ot1pbk.fd contains the information for associating TeX font names to .tfm files. In particular we can find in it

\DeclareFontShape{OT1}{pbk}{m}{sc}{<->ssub * pbk/l/sc}{}


which tells LaTeX that when a medium weight small caps font in the pbk family, this should be substituted with light weight small caps; in turns this is defined by

\DeclareFontShape{OT1}{pbk}{l}{sc}{
<-> pbklc7t
}{}


OK, now we know that your \largeheadfont\textsc{MyName}, TeX will load the font corresponding to pbklc7t.tfm.

Let's go back to the .fls file. Just after the line that shows the .tfm file has been read in, we find that also pbklc7t.vf is loaded. Yes, pbklc7t is a virtual font, built from two copies of pbkl8r.tfm (it's a fake small caps font, where lower case letters are scaled uppercase ones).

The similar lines for pbkl7t.tfm are there because of the page number and are not of a concern here.

The pdftex.map ought to contain a line for pbkl8r and indeed, on my machine there is

pbkl8r URWBookmanL-Ligh " TeXBase1Encoding ReEncodeFont " <8r.enc <ubkl8a.pfb


corresponding to the input of 8r.enc (a reencoding vector) and the ubkl8a.pfb font file for producing the PDF file.

If you get the message

mktexpk: don't know how to create bitmap font for pbklc7t.


then your TeX system is defective. Installing the full new TeX Live 2017 from scratch can help.

# Question 2

The ot1cmdh.fd file contains, apart from irrelevant comments,

\ProvidesFile{t1cmdh.fd}
[2014/09/29 v2.5h Standard LaTeX font definitions]
\providecommand{\EC@family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
<17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
\DeclareFontFamily{T1}{cmdh}{}
\EC@family{T1}{cmdh}{m}{n}{ecdh}
\endinput


This means that cmdh is available only at fixed sizes, in medium weight and normal shape. Asking for the font at 28pt will result in the one for 29.86pt substituted. More importantly, there is no small caps shape defined, so when you ask for it, you will get normal shape, which is what the warning

LaTeX Font Warning: Font shape T1/cmdh/m/sc' undefined
(Font)              using T1/cmdh/m/n' instead on input line 23.


exactly means: you can't get font that don't exist in the first place.

• /sigh/ indeed, my TeX installation was bad. xdvi and dvips and a few other programs were incorrectly looking in /usr/local instead of /usr/share` and (of course) not finding the font files. And indeed, the cmdh font sadly does not have small caps. – hymie Jun 7 '17 at 2:09
• Thank you very much for the detailed debugging info. I'll have to keep some notes on all of this. – hymie Jun 7 '17 at 12:02