I'm sure this is a newbie question, but I can't figure this out.
I have tried to follow the advice here:
http://en.wikibooks.org/wiki/LaTeX/Fonts
and here:
http://www.cl.cam.ac.uk/~rf10/pstex/latexcommands.htm
But I can not seem to be able to generate any font change. I either get no change or error messages.
Here is the output of one failed attempt to change the font to Times using this command:
\rmfamily
\renewcommand{\rmdefault}{ptm}
Apparently I either don't have a correct package installed or…
The output says " Metric (TFM) file not found." but I am not sure where to go from there.
Best Answer
Most of the time, it's advised to load the fonts you want beforehand by loading packages. A list of packages available in most TeX distributions can be found online in The LaTeX Font Catalogue.
Packages will define
\rmdefault
(roman),\sfdefault
(sans-serif) or\ttdefault
(monospaced). For example:Will set TeX Gyre Termes as the roman font, TeX Gyre Heros as the sans-serif font and TeX Gyre Cursor as the monospaced font.
XeTeX/LuaTeX users can also change the font families using the
fontspec
package: using\setmainfont
,\setsansfont
or\setmonofont
respectively.One can change the default font family with:
However, sometimes one wishes to specify a font directly, with
fontspec
this is also quite easy:For Type 1 fonts this is a bit more difficult:
More information about font names can be found in this question.