As Henri Menke said, you want to download the font files into a directory and select them by filename using Path=
and Extension=
.
However, since you are on Windows and have no root directory, a pathname like that will not work. Any absolute pathname will break as soon as someone else tries to compile the document on their computer.
What you want to do is download the fonts into a subdirectory of your project folder, called (for example) fonts
. Then, load your font with Path = ./fonts/
. Make sure your build command is running from the project directory. This is portable to any OS.
You don’t need to go through any special rigmarole to install the fonts on your system. If you specify the exact filename and path, your TeX engine will be able to find it even though it is not installed as a system font. This is a great way to use a different version of a font already present on your system or in your TeX distribution.
So, something like:
\setmainfont{MinionPro}[
Path = ./fonts/ ,
Extension = .otf ,
UprightFont = *-Regular ,
BoldFont = *-Bold ,
ItalicFont = *-It ,
BoldItalicFont = *-BoldIt]
This will search for ./fonts/MinionPro-Regular.otf
, ./fonts/MinionPro-Bold.otf
, and so on. Just downloading the files to the specified directory is enough.
To stay on the safe side, make the pieces of the name in your source file case-sensitive, even though they do not need to be on Windows.
It might be helpful to anyone else trying to compile your document to add a comment with a link to obtain the font.
Alternative solution: stick the font files in the same directory as your source files, don’t distribute them with your source (especially if their license does not allow it), specify a filename but not a Path =
, and just require any other user to get a hold of them in order to compile. You could even throw in a conditional to use the non-standard font only if it is installed.