I am trying to use JetBrainsMono as the main font for beamer. I am using xelatex to compile the document and it seems to recognize the font but the font is not applied to the document.
\documentclass[aspectratio=169]{beamer}
\usepackage{fontspec}
\usepackage[spanish]{babel}
\newfontfamily{\jtbmedium}{JetBrainsMono-Medium}[
Path =/home/dbarcene/.fonts/,
Extension =.ttf,
Ligatures =TeX]
\newfontfamily{\jtbbold}{JetBrainsMono-Bold}[
Path =/home/dbarcene/.fonts/,
Extension =.ttf,
Ligatures =TeX]
\setmainfont{\jtbmedium}
\title{Long Title}
\author{John Doe}
\date\today
\begin{document}
\maketitle
\section{First Section}
\begin{frame}{First Frame}
Hello, world!
\end{frame}
\end{document}
What would be the proper procedure to use system fonts like JetBrainsMono in beamer? Thanks in advance.
