6

(I sincerely hope this question hasn't been asked; if so my apologies, I wasn't able to locate it.)

I have started defining my own themes more and more lately in Beamer, including changing the font, to make it look less standard. Now I'm looking for a (relatively) easy way to define a different type of font for the titles as compared to the regular text.

Titles would include: \title, \frametitle and \framesubtitle. Regular text is then anything from text to \footnote, to the boxes and such.

Let's say I would want Cyklop for my titles (http://www.tug.dk/FontCatalogue/cyklop/) and Malvern (http://www.tug.dk/FontCatalogue/malvern/) for the regular text. What would be the best way to do this?

Thanks so much in advance! DD

3
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – Corentin
    Commented Aug 30, 2013 at 20:59
  • Don't you want to use some font other than Malvern? "The package as it is on CTAN is based on a LaTeX2.09 installation. Some support for LaTeX2e is available, though buggy." Commented Aug 30, 2013 at 21:04
  • I actually just randomly picked two fonts from the font Catalogue as an example for my question. :-)
    – user35962
    Commented Aug 30, 2013 at 21:34

1 Answer 1

4

Here's one possibility using pdfLaTeX; I choose Cyklop for the titles and Iwona for the regular text; I didn't use the originally requested Malvern font since the Font Catalogue warns:

The package as it is on CTAN is based on a LaTeX2.09 installation. Some support for LaTeX2e is available, though buggy.

Basically waht you do is to set the apropriate font for the elements using \setbeamerfont; for the regular text you have the normal text font, but another option is to change the sans-serif family used (as I did in my example).

The beamer manual can help you with the available fonts that are modifiable through \setbeamerfont. Ahother useful source could be the beamer appearance cheat sheet.

\documentclass{beamer}
\usetheme{CambridgeUS}

\usepackage[T1]{fontenc}
\usepackage{lipsum}

\setbeamerfont{title}{family=\fontfamily{cyklop}\selectfont}
\setbeamerfont{frametitle}{family=\fontfamily{cyklop}\selectfont}
\setbeamerfont{framesubtitle}{family=\fontfamily{cyklop}\selectfont}
\renewcommand{\sfdefault}{iwona}
\usefonttheme{professionalfonts}

\begin{document}

\begin{frame}
\frametitle{Test frame title}
\framesubtitle{Test frame subtitle}
\lipsum[4]
\end{frame}

\end{document}

enter image description here

Another options is to use XeLaTeX and appropriate fonts.

3
  • 1
    This looks very much like what I'm looking for! :-) Next question is then, how do I find which fonts are useable and what their specific name would be in \renewcommand? Is there a way to find this out?
    – user35962
    Commented Aug 30, 2013 at 21:38
  • @user35962 the LaTeX Font Catalogue gives information about the packages needed for fonts; you need to check that the font is available in your system. If it's not, you'll need to install it. Often, the font README or documentation give directions on the installation (this can be a true ordeal in some cases). The .fd files for the fonts give you the family, series,... information for the fonts. Commented Aug 30, 2013 at 21:41
  • Adding to Gonzalo Medina's comment about XeLaTex, I find traditional LaTeX font management more work than it's worth. If you want to learn the details, you should, and you will have more flexibility because of it. But if you don't, consider using XeLaTeX, which should give you access in relatively simple ways to any font that's installed by your operating system, word processing programs, etc. On a Mac, for example, I find it's trivial to add free downloaded fonts using the built in Mac Font Book utility, and then use them immediately in my latex documents.
    – Mars
    Commented Aug 31, 2013 at 3:46

You must log in to answer this question.

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