# Using an OTF font with beamer and lualatex

I have recently acquired one of those very complete OTF font families (Latin / Greek / Cyrillic, with small caps and many ligatures). I managed to get it work with LuaLaTeX thanks to fontspec, but when I try to use it in beamer, nothing happens (I get the standard beamer sans serif fonts). Here is my (minimal) code which doesn't work:

\documentclass{beamer}
\usepackage[no-math]{fontspec}
\usepackage{luatextra}
\usefonttheme{professionalfonts}
\usetheme{AnnArbor}
\usecolortheme{crane}
\setmainfont[
Path           = /hom/yannis/texmf/cours/stats/,
Extension      = .otf,
Ligatures      = TeX,
BoldFont       = FedraSerifProABold,
ItalicFont     = FedraSerifProABookItalic,
BoldItalicFont = FedraSerifProABoldItalic
]{FedraSerifProABook}
\begin{document}
\begin{frame}Bonjour Καλημέρα καὶ τῷ Θεῷ Δόξα\end{frame}
\end{document}


The font is OK since exactly the same code but with article class and without the beamer-specific commands and environments works perfectly. So, what am I doing wrong?

My luatex version is beta-0.70.2-2012062819 (TeX Live 2012) (format=lualatex 2013.6.6).

• Beamer use by default the sans serif family, so you should use \setsansfont – Ulrike Fischer Apr 4 '16 at 8:51
• Thanks, it works! It was as simple as that, I should have figured it out. Is there a way to use the Latin and Greek glyphs of the fonts for mathematical symbols? – yannis Apr 4 '16 at 9:02

In her comment, Ulrike Fischer already gave the answer to your initial question: since Beamer use the sans serif family by default, you should declare your font as the sans font, not the main font, using \setsans. As for selecting math fonts, you me look at this question.
• Yes Ulrike's solution works (it's that simple, but you have to figure it out). As for math, I used the mathastext package, but it doesn't use Greek letters as symbols. Has nobody thought about simply taking Greek letters out of the Greek text part of the font, and use them with \alpha, \beta, etc.? – yannis Apr 4 '16 at 11:47
• I redefined all letters like \def\alpha{\ensuremath{\text{\textit{α}}}}, this works just fine. – yannis Apr 4 '16 at 14:36
• But I guess that messes up math spacing, when you have, say, \alpha\beta, or doesn't it? – Daniel Apr 4 '16 at 21:19