# Letterspacing in a colorbox in beamer

Preparing a beamer presentation with my own template, I wanted to change for a single slide that the foot line gets a white background (because I have a graphic that exceeds the margins). So I changed the text in foot beamer template (which is called by the footline template) to wrap everything within a colorbox. After compiling I saw that the the foot line on this slide has a different inter-letter spacing than all the other slides.

Reducing the document to a minimum code that still reproduces this feature, I found that the helvet package, a beamercolorbox and the colorbox seem to be necessary. So here is a MWE:

\documentclass{beamer}
\usepackage{helvet}

\setbeamertemplate{footline}{
\usebeamertemplate{text in foot}
\end{beamercolorbox}
}
\setbeamertemplate{text in foot}{
}

\author{My Name}

\begin{document}

\begin{frame}
\end{frame}

\bgroup
\setbeamertemplate{text in foot}{\hspace*{-0.5\fboxsep}\colorbox{white}{%
}}
\begin{frame}
\end{frame}
\egroup

\end{document}


What you see is that the distance between M and y, or N and a is different on the two slides. So here is my question:

• What causes this difference?
• Which of the two versions is "right", i.e. properly typeset?
• I see no difference (when I compile it myself). Are you sure it's not just a screen artifact? BTW, it's the kerning, not letterspacing, that is different - letterspacing would apply to all inter-letter spaces. – Robert Jun 12 '17 at 13:46
• I tested it with different zooms and more than just two slides. It is always only the slides with the additional colorbox that have the different kerning. – Tiuri Jun 12 '17 at 13:49
• I agree with @Robert - compiling with pdflatex from texlive2017 I don't see any difference. – user36296 Jun 12 '17 at 19:34

Why not simply change the colour?

\documentclass{beamer}
\usepackage{helvet}

\setbeamertemplate{footline}{%
\usebeamertemplate{text in foot}%
\end{beamercolorbox}%
}
\setbeamertemplate{text in foot}{%
}

\author{My Name}

\begin{document}

\begin{frame}
\end{frame}

\bgroup