I am trying to use Calibri in a beamer presentation, as per this answer. Everything seems to go fine, but in the PDF the font is LMSans
. I can see the embedded font by looking up the fonts properties in Adobe reader, or by opening the PDF in a text editor.
I am running TexStudio and MikTex on Windows, the family of Calibri.ttf files are in both C:\Windows\Fonts
and C:\Windows\WinSxS\amd64_microsoft-windows-font-truetype-calibri_31bf3856ad364e35_10.0.15063.0_none_fbba0686289345e3
.
Here's a MWE:
\documentclass{beamer}
\usepackage{fontspec}
\setmainfont{Calibri}
\begin{document}
\begin{frame}
test
\end{frame}
\end{document}
Looking in the log file it appears that Lualatex is loading both the Calibri files and the LMSans files from MikTex:
("C:/Program Files/MiKTeX 2.9/tex/latex/fontspec/fontspec.cfg")(load luc: C:/Us
ers/username/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/lmsans10-bo
ld.luc)(load luc: C:/Users/username/AppData/Local/MiKTeX/2.9/luatex-cache/generi
c/fonts/otl/lmsans10-oblique.luc)))(load luc: C:/Users/username/AppData/Local/Mi
KTeX/2.9/luatex-cache/generic/fonts/otl/calibri.luc)(load luc: C:/Users/username
/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/calibriz.luc)(load luc
: C:/Users/username/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/cali
brib.luc)(load luc: C:/Users/username/AppData/Local/MiKTeX/2.9/luatex-cache/gene
ric/fonts/otl/calibrii.luc)
Later on only mentions LMSans, not Calibri:
(./MWE.nav)(load luc: C:/Users/username/AppData/Local/MiKTeX/2.9
/luatex-cache/generic/fonts/otl/lmsans8-regular.luc)(load luc: C:/Users/username
/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/otl/lmsans17-regular.luc)(
load luc: C:/Users/username/AppData/Local/MiKTeX/2.9/luatex-cache/generic/fonts/
otl/lmsans12-regular.luc) (./MWE.aux))
\setsansfont
rather than\setmainfont
.\setmainfont
, is add\usefonttheme{serif}
.