I want to change the beamer font into Times New Roman.
\documentclass{beamer}
\usepackage{fontspec}
\usecolortheme[named=black]{structure}
\usefonttheme[onlymath]{serif}
\setmainfont{Times New Roman}
\begin{document}
\begin{frame}
\frametitle{Title}
This is a sample frame.
Math equation: $E = mc^2$
\end{frame}
\end{document}
But the \setmainfont{Times New Roman} does not work.
\setsansfont{Times New Roman}. – Jasper Habicht Jun 05 '23 at 07:01