# [Tex/LaTex] What fonts are installed on the box

fonts

How can I find out which fonts are currently available in my TeX installation? (I'm using a Mac, OS 10.6.x, if that matters, although I'd prefer a machine-independent TeX-based answer). Thanks.

As a followup, I tried googling for an answer to this question, without much success. Is there somewhere I could have looked for myself?

There isn't a definitive "these are the fonts installed" reference, but you can usually discover them by poking around in your TeX distribution. For example, look in /usr/local/texlive/2009/texmf-dist/fonts/ ; you'll find a bunch of subdirectories with type1 fonts, tfm files, and so on. To load a font in LaTeX, however, you need .fd files, and these are found alongside any .sty files for the fonts. For example, t1lmr.fd is the font definition for loading the Latin modern roman fonts with \fontfamily{lmr} (assuming the T1 encoding).

Anyway, the directory names for the fonts themselves will give you clues about packages to load if you're using LaTeX; otherwise, any font with a tfm file (such as ec-lmr10.tfm for Latin modern roman at 10pt) can be loaded in plain TeX with

\font\tenrm=ec-lmr10 at 10pt


You might font individual font packages easier to locate by browsing through CTAN, since the support files will be located alongside the fonts themselves.

Update

You could grep through the LaTeX support files to find a comprehensive listing of available font families, if you liked; not sure how useful this is, but try:

 find /usr/local/texlive/2010/texmf-dist/tex/latex/ -name '*.fd' | xargs grep '\\DeclareFontFamily' | sed 's#.*\\DeclareFontFamily{$$[a-zA-Z0-9]*$$}{$$[a-zA-Z0-9]*$$}.*#  \1    \2#'


(My shell scripting skills are a little rusty, but you get the idea.) Change the first [a-zA-Z0-9]* into, say, T1 if you want only fonts with that encoding.