When using the metropolis theme for beamer, I get text and math in Fira Sans, except for math operators. I compile the following MWE using LuaTeX.
\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
\begin{frame}
Ordinary text.
\[ a^2 + b^2 = \sin^2(x) - \mathsf{y} + \mathrm{z} \]
\end{frame}
\end{document}
The outcome for me is that a, b, 2 and x are set in Fira Sans Light Italic, and y is set in Fira Sans Light, but sin is set in the sans font of (I guess) Latin Modern. (The z is also in Latin Modern, but this is expected behaviour from beamer.)
Unsurprisingly, I get the same result if I replace \usetheme{metropolis} with
\usepackage[no-math]{fontspec}
\setsansfont[ItalicFont={Fira Sans Light Italic},
BoldFont={Fira Sans},
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}
I guess that this is to do with beamer's patching parts of the math fonts to match the text font (see this previous question). However, I don't understand the font system well enough to modify this.
There was a similar question asked before, but I've no idea how to apply that answer when using fontspec, or if this is even possible.
Is there a way to change the operator font to match the upright/sans math font (i.e., Fira Sans Light)?


\usepackage[italic]{mathastext}automatically sets the operators in the (upright) text font, and looks otherwise almost identical to beamer's output, the exception being that\mathrmis now the upright text font instead of the inherited Latin Modern. Still, I would be interested to know how to change the operator font by hand! – Alex Watson Mar 01 '19 at 21:48