I am trying to use the code mentioned in this answer to change the size of all fonts for some Beamer frame. In particular, I \input the size12.clo file in the middle of my document. It seems to work as intended, but the content of the next frame is moved/shifted down for some reason. I wonder what causes this shift and if there is any way of how to remove it.
Code:
\documentclass[11pt]{beamer}
\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\begin{document}
% default font size (11pt Beamer option):
\begin{frame}[fragile]
\frametitle{Some Frame Title}
\begin{block}{Some Block Title}
Some initial text\dots
\begin{itemize}
\item Some 1st level text\dots
\begin{itemize}
\item Some 2nd level text\dots
\end{itemize}
\end{itemize}
\end{block}
\begin{lstlisting}
some source code +* = %
\end{lstlisting}
\end{frame}
% larger font size (as with 12pt Beamer option):
\let\savednewcommand\newcommand
\let\newcommand\renewcommand
\makeatletter
\input{size12.clo}
\makeatother
\let\newcommand\savednewcommand
\begin{frame}[fragile]
\frametitle{Some Frame Title}
\begin{block}{Some Block Title}
Some initial text\dots
\begin{itemize}
\item Some 1st level text\dots
\begin{itemize}
\item Some 2nd level text\dots
\end{itemize}
\end{itemize}
\end{block}
\begin{lstlisting}
some source code +* = %
\end{lstlisting}
\end{frame}
\end{document}



size12.closets up all page layout section headings and list spacing and other stuff for the standard article, report, book to load it mid-document will only ever work by accident, especially in a non standard class like beamer – David Carlisle Dec 14 '23 at 11:24normal fonttemplate and use the relsize package to define items and stuff relative to the current font. – samcarter_is_at_topanswers.xyz Dec 14 '23 at 11:44