[Tex/LaTex] Beamer metropolis theme, recommend a math font that matches with Fira

beamerbeamer-metropolisfontsmath-fonts

Original Question

The Beamer theme "metropolis" uses by default the Fira family of typefaces.

I'm not particularly satisfied by the combination of Fira and the usual math fonts, which math fonts would you recommend?

My preamble is

\documentclass[aspectratio=169]{beamer}
\usetheme[titleformat=smallcaps,block=fill]{metropolis}
%\metroset{outer/frametitleformat=smallcaps}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded]

The results are like this

enter image description here


Addendum (with MWE)

I have used the Euler font and the following MWE

17:37 boffi@debian:~ $ cat a.tex
\documentclass[aspectratio=169]{beamer}
\usepackage{eulervm}
\usetheme{metropolis}
\begin{document}
ABCDEFGHIJKLMNOPQRSTUVwxyZ0123456789\\
abcdefghijklmnopqrstuvwxyz0123456789\\
$z = d - \kappa x = (1 - \kappa\xi) d = \zeta d$
\end{document}

It is worth to note that pdflatex has no direct means to load system OTF fonts and that metropolis automagically uses a font different from Fira in this case..

I have

$ pdflatex a; mv a.pdf a_pdf.pdf; lualatex a; mv a.pdf a_lua.pdf
... lots of stuff
$ 

to have the following results

17:36 boffi@debian:~ $ pdffonts a_pdf.pdf 
name                            type              encoding         emb sub uni object ID
------------------------------- ----------------- ---------------- --- --- --- ---------
TJUSKZ+CMSS10                   Type 1            Builtin          yes yes no      18  0
ZNYXXU+CMSSI10                  Type 1            Builtin          yes yes no      19  0
WUOKZV+EUFM10                   Type 1            Builtin          yes yes no      20  0
SNTYPH+EURM10                   Type 1            Builtin          yes yes no      21  0
OOQWQL+CMSS8                    Type 1            Builtin          yes yes no      22  0
17:37 boffi@debian:~ $ pdffonts a_lua.pdf 
name                            type              encoding         emb sub uni object ID
------------------------------- ----------------- ---------------- --- --- --- ---------
UQMZJP+FiraSans-Light           CID Type 0C       Identity-H       yes yes yes     18  0
FCXRGI+FiraSans-LightItalic     CID Type 0C       Identity-H       yes yes yes     19  0
WUOKZV+EUFM10                   Type 1            Builtin          yes yes no      20  0
SNTYPH+EURM10                   Type 1            Builtin          yes yes no      21  0

and these are the relevant screenshots

pdflatex

enter image description here

lualatex

enter image description here

(I have also used xelatex but the results are the same as in lualatex, so I've omitted its results)

I have these issue with math fonts and Fira

  1. the x-height is significantly smaller for both CMMI and Euler
  2. Euler strokes and, to a lesser degree CMMI strokes are significantly heavier than Fira Light Italic
  3. Euler is however better (imho) because CMMI is SO CURLY when compared to Fira.

Best Answer

Update

I have just discovered the existence of FiraMath font, here an example of the font from https://github.com/firamath/firamath

enter image description here

The Github repository above gives instructions for installing the font ­– but it's already in Texlive – and instructions to use it in XeLaTeX or LuaLaTeX that I report for completeness

\documentclass{article}
\usepackage{amsmath}
\usepackage[mathrm=sym]{unicode-math}
\setmathfont{Fira Math}

\begin{document}
\[
  \int_0^{\mathrm{\pi}} \sin x \, \mathrm{d}x = 2
\]
\end{document}

I've found that arevmath is the way to go, but to have a good match with the metropolis theme one has to modify slightly the weights of Fira. metropolis uses Fira Lightand Fira Book for regular and bold text, that are both light when compared to arev mathematical characters. To have a better match I've changed in the preamble the sans font and the relevant variations as follows

\documentclass[aspectratio=169]{beamer}
\usetheme{metropolis}
\usepackage{arevmath}
\setsansfont[
  BoldFont={Fira Sans SemiBold},
  ItalicFont={Fira Sans BookItalic},
  BoldItalicFont={Fira Sans SemiBold Italic}
]{Fira Sans Book}
\begin{document}
% ...

and using the following body

% ...
\emph{ABCDEFG abcdefg 0123456789}\\
\textbf{ABCDEFG abcdefg 0123456789}\\
\emph{\textbf{ABCDEFG abcdefg 0123456789}}
\[z = f(g)-B-\kappa x+\beta n = (1-\kappa\xi).\]
\[z = \boldsymbol{f}(g)-B-\kappa x+\beta n = (1-\boldsymbol{\kappa}\xi).\]
\end{document}

I can have the following results enter image description here

In my opinion there is a good match between math and text but I'm very open to criticisms.