The first subsection introduces the predefined font themes that come with beamer and which make it easy to change the fonts used in a presentation. The next subsection describes further special commands for changing some basic attributes of the fonts used in a presentation. The last subsection explains how you can get a much more fine-grained control over the fonts used for every individual element of a presentation.
beamer comes with a set of font themes. When you use such a theme, certain fonts are changed as described below. You can use several font themes in concert. For historical reasons, you cannot change all aspects of the fonts used using font themes—in some cases special commands and options are needed, which are described in the next subsection.
The following font themes only change certain font attributes, they do not choose special font families (although that would also be possible and themes doing just that might be added in the future). Currently, to change the font family, you need to load special packages as explained in the next subsection.
The default font theme installs a sans serif font for all text of the presentation. The default theme installs different font sizes for things like titles or head- and footlines, but does not use boldface or italics for “highlighting.” To change some or all text to a serif font, use the serif theme.
Note: The command \mathrm will always produce upright (not slanted), serif text and the command \mathsf will always produce upright, sans-serif text. The command \mathbf will produce upright, bold-face, sans-serif or serif text, depending on whether mathsans or mathserif is used.
To produce an upright, sans-serif or serif text, depending on whether mathsans or mathserif is used, you can use for instance the command \operatorname from the amsmath package. Using this command instead of \mathrm or \mathsf directly will automatically adjust upright mathematical text if you switch from sans-serif to serif or back.
\usefonttheme [ ⟨ options ⟩ ]
This theme causes all text to be typeset using the default serif font (except if you specify certain ⟨ options ⟩ ). You might wish to consult Section 5.6.2 on whether you should use serif fonts.
The following ⟨ options ⟩ may be given:
\usefonttheme [ ⟨ options ⟩ ]
This font theme will cause titles and text in the headlines, footlines, and sidebars to be typeset in a bold font.
The following ⟨ options ⟩ may be given:
As pointed out in Section 5.6.1 , you should use this theme (possibly with the onlysmall option) if your font is not scaled down properly or for light-on-dark text.
The normal themes do not install this theme by default, while the old compatibility themes do. Since you can reload the theme once it has been loaded, you cannot use this theme with the old compatibility themes to set also titles to a bold font.
\usefonttheme [ ⟨ options ⟩ ]
This theme is similarly as the structurebold font theme, but where structurebold makes text bold, this theme typesets it in italics and in the standard serif font. The same ⟨ options ⟩ as for the structurebold theme are supported. See Section 5.6.3 for the pros and cons of using italics.
\usefonttheme [ ⟨ options ⟩ ]
Again, this theme does exactly the same as the structurebold font theme, only this time text is set using small caps and a serif font. The same ⟨ options ⟩ as for the structurebold theme are supported. See Section 5.6.3 for the pros and cons of using small caps.
While most font decisions can be made using font themes, for historical reasons some changes can only be made using class options or by loading special packages. These options are explained in the following. Possibly, these options will be replaced by themes in the future.
As pointed out in Section 5.6.1 , measuring the default font size in points is not really a good idea for presentations. Nevertheless, beamer does just that, setting the default font size to 11pt as usual. This may seem ridiculously small, but the actual size of each frame size is by default just 128mm by 96mm and the viewer application enlarges the font. By specifying a default font size smaller than 11pt you can put more onto each slide, by specifying a larger font size you can fit on less.
To specify the font size, you can use the following class options:
This is way too small. Requires that the package extsize is installed.
This is also too small. Requires that the package extsize is installed.
If you really need to fit more onto each frame, use this option. Works without extsize .
Same as the 10pt option.
The default font size. You need not specify this option.
Makes all fonts a little bigger, which makes the text more readable. The downside is that less fits onto each frame.
Same as the 12pt option.
Makes all fonts somewhat bigger. Requires extsize to be installed.
This is about the default size of PowerPoint and OpenOffice.org Impress. Requires extsize to be installed.
This is really huge. Requires extsize to be installed.
By default, beamer uses the Computer Modern fonts. To change this, you can use one of the prepared packages of L a T e X ’s font mechanism. For example, to change to Times/Helvetica, simply add
in your preamble. Note that if you do not use the serif font theme, Helvetica (not Times) will be selected as the text font.
There may be many other fonts available on your installation. Typically, at least some of the following packages should be available: arev , avant , bookman , chancery , charter , euler , helvet , lmodern , mathtime , mathptm , mathptmx , newcent , palatino , pifont , utopia .
The same font can come in different encodings, which are (very roughly spoken) the ways the characters of a text are mapped to glyphs (the actual shape of a particular character in a particular font at a particular size). In T e X two encodings are often used with Latin characters: the T1 encoding and the OT1 encoding (old T1 encoding).
Conceptually, the newer T1 encoding is preferable over the old OT1 encoding. For example, hyphenation of words containing umlauts (like the famous German word Fräulein) will work only if you use the T1 encoding. Unfortunately, the EC fonts, that is, the T1-encoded Computer Modern fonts, are distributed on small installations just as MetaFont sources and only have bitmap renditions of each glyph. For this reason, using the T1-encoded EC fonts on such small installations will produce pdf files that render poorly.
T e X Live (cross-platform; replaced older teTeX for unix /Linux) and MiK T e X (for Windows platforms) can be installed with different levels of completeness. Concerning the Computer Modern fonts, the following packages can be installed: cm-super fonts, lmodern (Latin Modern) fonts, and lgc fonts, the latter containing the Latin, Greek, and Cyrillic alphabets. Concerning other fonts, the txfonts and pxfonts are two extended sets of the Times and the Palatino PostScript fonts, both packages containing extended sets of mathematical glyphs. Most other standard PostScript fonts are also available in T1 encoding.
Among the packages that make available the Computer Modern fonts in the T1 encoding, the package lmodern may be suggested. If you use lmodern , several extra fonts become available (like a sans-serif boldface math) and extra symbols (like proper guillemots).
To select the T1 encoding, use \usepackage[T1] . Thus, if you have the LM fonts installed, you could write
to get beautiful outline fonts and correct hyphenation. Note, however, that certain older versions of the LM bundle did not include correct glyphs for ligatures like “fi,” which may cause trouble. Double check that all ligatures are displayed correctly and, if not, update your installation.
Everything mentioned above applies to pdflatex and latex + dvips . Unlike those engines, xelatex and lualatex support OpenType fonts, and that means that you can use system fonts in your documents relatively easy. Details will eventually be documented in this manual. For now, you can take a look at the documentation for the fontspec package which supports both engines. Also, note that when you use lualatex or xelatex with TU encoding, respectively, by default you get OpenType Latin Modern fonts.
This section explains how beamer ’s font management works.
beamer ’s font mechanism is somewhat similar to beamer ’s color mechanism, but not quite the same. Similar to colors, every beamer element, like the frame titles, the document title, the footnotes, and so on has a certain beamer -font. Similar to colors, on the one hand you can specify the font of each element individually; on the other hand fonts also use inheritance, thereby making it easy to globally change the fonts used for, say, “titlelike things” or for “itemizelike things.”
While a beamer -color has a certain foreground and a certain background, either of which may be empty, a beamer -font has a size, a shape, a series, and a family, each of which may be empty. The inheritance relation among beamer -fonts is not necessarily the same as between beamer -colors, though we have tried to match them whenever possible.
Multiple inheritance plays a more important rule for fonts than it does for colors. A font might inherit the attributes of two different fonts. If one of them specifies that the font should be, say, boldface and the other specifies that the font should be, say, large, then the child font will be both large and bold.
As for fonts, the description of the font used for an element is given after the description of the element.
To use a beamer -font, you can use the command \usebeamerfont . Inside the templates for elements, this command will (typically) have already been called for you, so you will only seldomly have to use this command.
This command changes the current font to the font specified by the ⟨ beamer-font name ⟩ . The ⟨ beamer-font name ⟩ can be a not-too-fancyful text and may contain spaces. Typical examples are frametitle or section in toc or My Font 1 . beamer -fonts can have (and should) have the same name as beamer -templates and beamer -colors.
Example: \usebeamerfont In the unstarred version of this command, the font is changed according to the attributes specified in the ⟨ beamer-font name ⟩ , but unspecified attributes remain unchanged. For example, if the font specifies that the font should be “bold,” but specifies nothing else, and if the current font is large, then \usebeamerfont causes the current font to become large and bold.
In the starred version of this command, the font is first reset before the font’s attributes are applied. Thus, in the above example of a beamer -font having only the attribute “boldface” set, saying \usebeamerfont* will always cause the current font to become a normal-shape, bold, default-family font (the font size won’t be reset).
As for beamer -colors, there exists a central command for setting and changing beamer -fonts.
This command sets or resets certain attributes of the beamer -font ⟨ beamer-font name ⟩ . In the unstarred version, this command just adds those attributes that have not been mentioned in a previous call and overwrites those that have been mentioned. Thus, the following two command blocks have the same effect:
In the starred version, the font attributes are first completely reset, that is, set to be empty.
The following ⟨ attributes ⟩ may be given:
\setbeamerfont