MWE
\documentclass[]{article}
\usepackage{amsthm,amsmath,amsfonts}
\usepackage[]{fontspec}
\setmainfont{Old Standard}[
FakeBold=2,
%SmallCapsFont=PlayfairDisplaySC-Black.otf,
%BoldFont=ModernMTStd-Bold.otf,
ItalicFont=ModernMT-ExtendedItalic.otf,
%BoldItalicFont=ModernMT-ExtendedItalic.otf,
]
\title{Test}
\author{Me}
\begin{document}
\maketitle
Just testing if the sum operator works.
\begin{align*}
F(n)
& = \sum_{d\mid n}f(d)\\
f\ast g
& = \sum_{d\mid n}f(d)g(n/d)
\end{align*}
\end{document}
But font is located in the same directory.
But if I comment out the italic font, it works properly.
\documentclass[]{article}
\usepackage{amsthm,amsmath,amsfonts}
\usepackage[]{fontspec}
\setmainfont{Old Standard}[
FakeBold=2,
%SmallCapsFont=PlayfairDisplaySC-Black.otf,
%BoldFont=ModernMTStd-Bold.otf,
%ItalicFont=ModernMT-ExtendedItalic.otf,
%BoldItalicFont=ModernMT-ExtendedItalic.otf,
]
\title{Test}
\author{Me}
\begin{document}
\maketitle
Just testing if the sum operator works.
\begin{align*}
F(n)
& = \sum_{d\mid n}f(d)\\
f\ast g
& = \sum_{d\mid n}f(d)g(n/d)
\end{align*}
\end{document}
Best Answer
fontspec
looks in the system font folder for system fonts (installed fonts)*.Otherwise, tell
fontspec
which folder the uninstalled fonts are in by using thePath=
option.For example, the following uses
AvrileSerif-Bold.ttf
as the upright font, andModernMT-ExtendedItalic.otf
as the italic font, both font files are in the local folder, so therefore thePath=
option is set toPath=./,
:This is an exaggerated example. I do not recommend random mixing of fonts for actual typesetting.
Note that text mode fonts (upright in blue, italics in red) are independent of math mode fonts). MWE
*On Windows, fonts installed as user are not visible; instead, install them as admin.