# beamer templating - baselineskip of \fontsize ignored

Can anyone explain why the second argument in \fontsize \textbox in the example is ignored in the footer template?

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}

\newcommand\testbox{\parbox[b]{30mm}{%
\fontsize{4mm}{10mm}\selectfont\bfseries
A\\B}%
}

\defbeamertemplate*{footline}{test}
{%
\leavevmode%
\hbox{%
\testbox
}%
\vskip0pt%
}

\begin{document}
\begin{frame}
\testbox
\end{frame}
\end{document}


• Interesting. ;-) – egreg Jul 17 '15 at 14:10
• The same effect can be observed in the headline template, but in the frametitle template, for example the value for \baselineskip has the desired effect. – Gonzalo Medina Jul 17 '15 at 14:16
• @egreg, well not the world I'd use. And it is more natural to set the baselineskip between to lines and having to fiddle with \vskip – daleif Jul 17 '15 at 14:17

The culprit is \offinterlineskip in the code that typesets the headline or footline (the effect can also be observed in the headline template); this is used several times when building the header/footer:

\def\beamer@typesetheadorfoot#1{% typeset the head or footline
{\parskip0pt\offinterlineskip%
\hbox{%
\hskip-\Gm@lmargin%
\hbox{%
\vbox{%
\@tempdima=\textwidth%
\textwidth=\paperwidth%
\hsize=\textwidth%
\def\\{,}%
\usebeamertemplate***{#1}%
}}%
\hskip-\Gm@rmargin%
}}\hfil%
}


and

 \def\@oddfoot{%

in beamerbaseframecomponents.sty.
• @daleif I imagine one could change the settings in the definition, but this will have effects in the way the footline is installed by the outer themes, so a change in the definition would imply changing the way the templates are installed by the themes. Seems a lot of work. – Gonzalo Medina Jul 17 '15 at 14:30
• Seems enough to just add \lineskiplimit=0pt inside the wrapping minipage` – daleif Jul 17 '15 at 14:39