I want to use a specific font only for the headings. Does anybody know how to change the font (and I mean really the font, not only its appearance like bold, italic or so) for the beamer block title only?
In the code below I added an own block-environment where the font is selected manually. I would like to do the same for the default blocks (maybe the setbeamerfont
command can be used for this but I have found no way to do so).
Furthermore, my own block has the deficit that it does not change its appearance according to the setbeamerfont
command, i.e. if I select a bold font for the title, it changes the appearance of the ordinary block, but not my own one.
\documentclass[slidestop]{beamer}
\usetheme{Madrid}
\newenvironment<>{myblock}[1]{%
\begin{actionenv}#2%
\def\insertblocktitle{\fontfamily{LinuxLibertineO}\selectfont #1\par}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
\begin{document}
\setbeamerfont{block title}{series=\bfseries}
\begin{frame}{Test}
\begin{block}{The quick brown fox jumps}
Test
\end{block}
\begin{myblock}{The quick brown fox jumps}
Test
\end{myblock}
\end{frame}
\end{document}
Best Answer
Like so:
You will find the commands used in the beamer guide. You could even use
\setbeamerfont{block title}{family*={LinuxLibertineO}}
.