# Issues

Issue #249 resolved

# When substituting math fonts, custom weights are not respected

luca_donetti
created an issue

To use the "light" weight of a font for normal text and the "medium" weight instead of bold I employ the following lines in my preamble (the actual font I'm using is lato but I don't think it is crucial):

\renewcommand{\mddefault}{l}
\renewcommand{\bfdefault}{m}


I noticed that beamer automatically uses the selected font also for math, but with the default weights, not the ones I selected. I solved the problem by making a local copy of beamerbasefont.sty and substituting {m} with {\mddefault} and {bx} with {\bfdefault} in the (I think) relevant lines: I don't know if this approach is correct or if it breaks something else. I'm attaching the patch I use for beamerbasefont.sty (with respect to beamer version in texlive 2012), below is a minimal example.

\documentclass{beamer}
\usepackage[defaultsans]{lato}
\renewcommand{\mddefault}{l}
\renewcommand{\bfdefault}{m}

\begin{document}
\begin{frame}
Look at the difference between 1 and $1$, or at $x+y$.
\end{frame}
\end{document}