Say I have a command like


used for changing the font of specific chunks of text to Palatino and I also want something similar for other fonts like Helvetica, Latin Modern Sans Serif, etc.

What's the quickest method to discover that the correct argument for Helvetica is phv and that for Latin Modern Sans is lmss?

I could have guessed the hv part but I would have never guessed the p in phv (now I know the reason why it's there, but this is not the point).

What I did was:

This same method didn't work for Latin Modern (too much doc files there) and I had to randomly search the internet until I found the magic string.

So, is there some general reference list for this? And why this information is left out of the font catalogue pages?

edit: looks like someone on another group had a similar question and was pointed to: http://latex.silmaril.ie/formattinginformation/typographics.html (which isn't a complete list, however)


4 Answers 4


I'm afraid such a method doesn't exist.

In the Eighties, Karl Berry proposed a font naming scheme for TeX/LaTeX that ensured, as much as possible, that metric file names consisted of at most eight characters, which was a constraint forced basically by an operating system I don't want to mention; the same constraint was forced for file names on CD-ROM.

A “Berry name” consists of various parts:

S TT W [V...] [N] [E] [DD]

(the square brackets represent optional parts), where S is one letter denoting the supplier (p is Adobe, b is Bitstream, u is URW, and so on). What you're interested in is TT, two alphanumeric characters representing the family name.

The document “Fontname – Filenames for TeX fonts” by Karl Berry is available in the major TeX distributions with texdoc fontname or at texdoc.net (or on CTAN). There you find a long list of two letter family names with the correspondence with the “real” font name.

Thus phv is “Adobe Helvetica”, while bhv can be “Bitstream Swiss 721” and uhv is “URW Nimbus Sans”.

Metafont based fonts don't follow the convention, so the family name for the Computer Modern Roman fonts is cmr. There is a family pair mr (Madrone) and the supplier c is Compugraphic; but cmr10 does not conform to the Berry naming scheme, so it can't misunderstood for a (probably inexistent) “Compugraphic Madrone”. If this font did exist problems would arise, though.

This is the past, however. Nowadays operating systems have lifted the eight character restriction on file names (at least at user level). Suppliers of LaTeX fonts have started using freely file names and no convention is followed.

For instance, the Quattrocento font uses Quattrocento-TLF as family name, while Iwona uses iwona and Linux Libertine has LinuxLibertineT-xxx (xxx stands for a two or three letter addition. The newpxtext package uses family names such as ntxr or ntxss.

The shell command

locate /t1 | grep 'texlive/2012' | grep '\.fd$'

which should find all .fd files relative to the T1 encoding finds 286 files; another 59 are found with /T1 (not all packages follow the recommendation that font description file names start with the encoding in lower case).

Basically, an instruction such as


loads the font description file <encoding><string>.fd. Say we're using T1 as output encoding; then \fontfamily{xyz} would load either t1xyz.fd or T1xyz.fd (if existent on your system).

Choosing from these font description file names is the only reliable way to find out what fonts you have.

Instead of the locate command one can exploit the ls-R file name cache of TeX Live, on Unix systems:

grep -i '^t1.*\.fd$' $(kpsewhich --all ls-R)

Note. The --all option seems to be replaceable by -a, which is what I've always used, but the short option is not documented.

  • Very interesting. As a side note, if someone else does not have the locate command installed by default and feels too lazy to install it, it can be substituted with find <path to texmf-dist directory> -name t1* | grep '\.fd'
    – d-cmst
    Commented Jun 13, 2013 at 13:20
  • @dcmst There's a different method that uses the ls-R file name caches.
    – egreg
    Commented Jun 13, 2013 at 13:30
  • Searching in ls-R outputs 350 .fd files instead of the 287 of the previous method (TL 2013 here). Any idea what's the reason for the difference?
    – d-cmst
    Commented Jun 13, 2013 at 13:53
  • 1
    @dcmst I get 289 + 63 = 352 with locate and 369 with grep. The difference are 17 .fd files I have in texmf-local
    – egreg
    Commented Jun 13, 2013 at 14:07
  • ahhh sure, forgot about local and T1
    – d-cmst
    Commented Jun 13, 2013 at 14:12
 texdoc fontname

on texlive systems at least will lead you to Karl Berry's opus on font names.

Or it is available on the web as


phv is on page 27....

lmss isn't in there (as the document is too old) but it explains the basic idea behind the cryptic names. Of course the reason for the cryptic names (MSDOS and other similar 8+3 file systems) doesn't really exist any-more, but still hard to change now.


Anselm Lingnau gives a little reference in his book "LaTeX Hacks". See page 236 (hack no. 67):

Computer Modern Roman: cmr

Adobe Times Roman: ptr

Adobe Palatino: ppt

ITC Bookman: pbk

Adobe New Century Schoolbok: pnc

Bera Serif: fve

URW Classico ("Optima"): uop

Computer Modern Sans: cmss

Computer Modern Bright: cmbr

Adobe Helvetica: phv

ITC Avant Garde Gothic: pag

Bera Sans: fvs

Computer Modern Typewriter: cmtt

Adobe Courier: pcr

(I left out those who are not free ware.)

  • adobe times roman (a) isn't free, and (b) is ptm in the berry scheme. (a pity that lingnau's book is in german: it looks interesting, but i'm not about to buy it (at that price! kindle almost as expensive as paper) and then spend an age translating!) Commented Apr 25, 2014 at 9:47

Method 1. Load the package, then print out the family using TeX

Step 1. Make a document that contains "Hello world" in your desired font.

\textsf{Hello world}

Step 2. Replace "Hello world" with Encoding: \csname f@encoding\endcsname, font family: \csname f@family\endcsname.

\textsf{Encoding: \csname f@encoding\endcsname, font family: \csname f@family\endcsname}


If the font is a weird symbol font, use \typeout and read from the console/log file.

\textsf{\typeout{Encoding: \csname f@encoding\endcsname, font family: \csname f@family\endcsname}}

The PDF will be blank, but the log file will contain the encoding/family name.

Remark. fontspec

Of course, for some fonts, you need to use fontspec to load it.

\setmainfont{Latin Modern Roman}
Encoding: \csname f@encoding\endcsname, font family: \csname f@family\endcsname

This will print out output.

While, after the \setmainfont in that specific document, the fontfamily is usable

\fontfamily{LatinModernRoman(0)}\selectfont Hello world

it is not recommended at all to rely on the (0) suffix.

Instead, use fontspec, and specify NFSSFamily=.... For example, see The macros setmainfont and setsansfont do not accept the new command of a newfontfamily. Is there compatibility between them?.


You must log in to answer this question.

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