[Tex/LaTex] Beamer with Metropolis them: problem with Fira Font on MacOS

beamerbeamer-metropolisfonts

I would like to do a beamer presentation using metropolis theme but am experiencing pb with Fira font.

I am with MacOs 10.13, and TexStudio.

I have checked these previous questions:

but none of the solutions proposed solved my pb.

I have downloaded the demo (as zip) from Overleaf web site. As in this demo package, the metropolis sty files are sitting next to my .tex

I downloaded Fira font as explained here: https://gist.github.com/muammar/a5ffb635eb7f532346a8e777b847f8a7 and Fira font is under my user/Library/Fonts.

I compile with xeLatex.

Here is a test doc:

\documentclass[10pt]{beamer}

\usetheme[progressbar=frametitle]{metropolis}
\usepackage{appendixnumberbeamer}
\usepackage{pgfplots}
\usepackage{xspace}

\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\setsansfont[BoldFont={Fira Sans}]{Fira Sans Light}
\setmonofont{Fira Mono}
\usepackage[sfdefault]{Fira Sans}

\title{Problem with Fira Sans}
\subtitle{test}
\date{}


\begin{document}

\maketitle

\begin{frame}{Test font}
 \sffamily Fira Sans
 \itshape Fira Sans Italic
 \bfseries Fira Sans Italic Bold
 \upshape Fira Sans Bold
 \scshape Fira Sans Bold Small-Caps
 \itshape Fira Sans Bold Italic Small-Caps
 \mdseries Fira Sans Italic Small-Caps
 \upshape Fira Sans Small-Caps

 \ttfamily
 Fira Mono
 \bfseries Fira Mono Bold
\end{frame}

\begin{frame}[fragile]{Font not working}

  The \themename theme is a Beamer theme with minimal visual noise
  inspired by the \href{https://github.com/hsrmbeamertheme/hsrmbeamertheme}    {\textsc{hsrm} Beamer
  Theme} by Benjamin Weiss.

  Enable the theme by loading

  \begin{verbatim}    \documentclass{beamer}
    \usetheme{metropolis}\end{verbatim}

  Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX
  installed to enjoy this wonderful typography.
\end{frame}

\end{document}

When using explicitely the font (Test font), it works, but the full document does not take Fira.

One last point: the log file shows that texlive is being used:

LaTeX Info: Redefining \ttfamily on input line 13.

(/usr/local/texlive/2017/texmf-dist/tex/latex/fira/FiraSans.sty
 Package: FiraSans 2016/11/20 (Bob Tennent and autoinst) Style file for Fira     San...
...
Requested font "[FiraSans-Regular.otf]/OT" at 10.0pt
 -> /usr/local/texlive/2017/texmf-dist/fonts/opentype/public/fira/FiraSans-    Regu
 lar.otf
 \g__fontspec_family_FiraSans_int=\count297
Requested font "[FiraSans-Bold.otf]/OT" at 10.0pt
 -> /usr/local/texlive/2017/texmf-dist/fonts/opentype/public/fira/FiraSans-     Bold
 .otf
 Requested font "[FiraSans-RegularItalic.otf]/OT" at 10.0pt
  -> /usr/local/texlive/2017/texmf-dist/fonts/opentype/public/fira/FiraSans-     Regu
 larItalic.otf
 Requested font "[FiraSans-BoldItalic.otf]/OT" at 10.0pt
  -> /usr/local/texlive/2017/texmf-dist/fonts/opentype/public/fira/FiraSans-Bold
 Italic.otf
 .................................................
 . fontspec info: "defining-font"
 . 
 . Font family 'FiraSans(0)' created for font 'FiraSans' with options
 . [Ligatures = TeX,Scale = 1,Extension = .otf,Ligatures=TeX,Numbers =
 . {Proportional,OldStyle},UprightFont = *-Regular,ItalicFont =
 . *-RegularItalic,BoldFont = *-Bold,BoldItalicFont = *-BoldItalic].
 .  
 s fonts.

(sorry for the no so well formatted copy-and-paste).

Many thanks in advance for your help.

Best Answer

In case it can help others facing same problem:

What works was to copy the Fira Font files I had downloaded as indicated here in user/Library/Fonts to the place where tex was actually looking for them (indicated in the log), i.e. /texlive/2017/texmf-dist/fonts/opentype/public/fira.

As indicated by @samcarter, no need to have \setsansfont[BoldFont={Fira Sans}]{Fira Sans Light} \setmonofont{Fira Mono} \usepackage[sfdefault]{Fira Sans}, xeLatex does the job by itself.

Last word: it pays off to look at the log file to understand what happens, even if long!