I want to change the font size of section and subsection titles in the header. It works fine for the section title, the header automatically increases its height (as stated in the beamer manual) but if I try the same thing with the subsection, I get following result.

Is there any way to set the subsection title's block height so the large subsection title fits?

I don't need that box to be of exact size, as I probably create a background using tkiz anyway. So if setting the size isn't possible, is there some way to just move the title it down a little bit?

\documentclass{beamer}
\usetheme{Berlin}

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\begin{frame}{Frame}
Content
\end{frame}
\end{document}


I get the same output when I try \subsection{\huge Subsection 1} instead of \setbeamerfont*.

-

The Berlin theme uses internally the miniframes outer theme; this outer theme explicitly sets the height of the color box used for the subsection in head/foot as 2.5ex, and its depth as 1.125ex. A change in the size font for the subsections won't therefore increase the height and depth of this box and will produce the undesired effect you noticed.

To change this behaviour, one can make the height and depth of this box font size-aware, by setting their values according to the height and depth of some appropriate characters with the desired font size, as I did in my example code below.

Notice also that I changed the order of \usetheme and \setbeamerfont so you don't have to declare the font size inside \subsection:

\documentclass[compress]{beamer}
\usetheme[]{Berlin}

\newlength\SubHt
\newlength\SubDh

\makeatletter
{%
\end{beamercolorbox}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.5\SubHt,dp=1.5\SubDh,%defaults: ht=2.5ex,  dp=1.125ex
\end{beamercolorbox}%
\fi%
\end{beamercolorbox}
}
\makeatother

\begin{document}
\section{Section 1}\subsection{Subsection g1}
\begin{frame}{Frame}
Content
\end{frame}
\end{document}


-

You can change the beamerfont headline.

## Code

\documentclass{beamer}
\usetheme{Berlin}

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\begin{frame}{Frame}
Content
\end{frame}
\end{document}


## Output

-
Excellent solution! If you want to keep the font size for section (say, footnotesize) different from that of subsection (say, huge), then you can issue an additional \setbeamerfont*{section in head/foot}{size=\footnotesize} call in the preamble. – landroni Jan 14 at 22:42