1

I use \usepackage[sfdefault,light,lining]{FiraSans} to reproduce the default font of the Beamer Metropolis theme. I followed this question for this.

However, the bold font looks too heavy. When I comment the \usepackage line, the font changes. The default font of Metropolis is different. I obtain these results with Overleaf and TeXstudio. It seems that I need to add another option to \usepackage or change the options there. How can I fix this?

MWE:

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

% Metropolis default font below? Bold font looks too heavy \usepackage[sfdefault,light,lining]{FiraSans}

\setbeamertemplate{frame footer}{Information for the footer}

\begin{document}

\begin{frame} \frametitle{Title of the slide, $\alpha$, $\gamma$} \begin{itemize} \item Item text \item Item text \end{itemize} \end{frame}

\end{document}

enter image description here

Andre
  • 969

1 Answers1

3

You can change the bold font for title using fontspec package.

\documentclass{beamer}
\usepackage{fontspec}
\usetheme{metropolis}

% Metropolis default font below? Bold font looks too heavy \usepackage[sfdefault,light,lining]{FiraSans}

\setbeamertemplate{frame footer}{Information for the footer}

\newfontfamily{\titlefont}{FiraSans}[% BoldFont = FiraSans-Medium.otf, ] \setbeamerfont{frametitle}{family=\titlefont}

\begin{document}

\begin{frame}
    \frametitle{Title of the slide, $\alpha$, $\gamma$}
    \begin{itemize}
        \item Item text
        \item Item text
    \end{itemize}
\end{frame}

\end{document}

enter image description here

Edit

Actually, it turns out the option medium does exactly the same thing! It uses medium font for \bfseries.

\documentclass[aspectratio=169]{beamer}
\usepackage{fontspec}
\usetheme{metropolis}

% Metropolis default font below? Bold font looks too heavy \usepackage[sfdefault,light,medium,lining]{FiraSans}

\setbeamertemplate{frame footer}{Information for the footer}

\begin{document}

\begin{frame}
    \frametitle{Title of the slide, $\alpha$, $\gamma$}
    \begin{itemize}
        \item Item text
        \item Item text
    \end{itemize}
\end{frame}

\end{document}

enter image description here

Zxcvasdf
  • 1,735
  • Thank you for the answer. However, I included the lines as you suggested and I receive the error messages "Package fontspec Error: The font "FiraSans" cannot be found," "Package fontspec Error: The font "FiraSans-Medium.otf" cannot be found," and "Font TU/FiraSans(12)/b/n/12=FiraSans-Medium.otf at 12.0pt not loadable: Metric (TFM) file or installed font not found." I downloaded FiraSans-Medium.otf to the directory of the main tex file, but it does not change the error messages. – Andre Feb 24 '23 at 19:43
  • I get the same error when I use xelatex. Can you try using lualatex? I didn't have a problem with that. – Zxcvasdf Feb 27 '23 at 03:45
  • Yes, it works with lualatex. Thank you. The font, however, is bold-regular: BoldFont = FiraSans-Regular.otf (not medium). – Andre Feb 27 '23 at 04:31
  • This solution is fine, but if you happen to know the option to use in \usepackage[sfdefault,light,lining]{FiraSans} to have the section titles behave in the expected way, it will be appreciated – Andre Feb 27 '23 at 04:36
  • 1
    @Andre, turns out it is possible. See my edit. – Zxcvasdf Feb 27 '23 at 07:34
  • This is good, thanks. Now I found the additional options. It turns out that medium gets closer, but the default font for bold is regular. But it is close enough. Thanks! – Andre Feb 27 '23 at 16:19