You seem to have a misunderstanding of font lookup of xetex
. The different lookup mechanisms are described in detail in the XeTeX manual, but I will try to boil things down a little for an answer.
If you provide a font name, e.g. Times New Roman, as in your first example, where you call
\setmainfont{Times New Roman}
then XeTeX will use your system's font utility to lookup the font. On GNU/Linux this is usually fontconfig
. XeTeX will say to fontconfig
“Where is the font with the name «Times New Roman»?”, and fontconfig
will reply something like “It is located in .fonts/Times New Roman/Times New Roman.ttf
.” Then XeTeX will proceed to call xdvipdfm
which loads the font from that file.
If you provide a file name instead of a font name, e.g. Times New Roman.ttf
, as in
\setmainfont{Times New Roman.ttf}
then XeTeX will immediately hand over to the xdvipdfm
utility to include the font from that file, i.e. either from Times New Roman.ttf
in the current directory or via kpathsea
from the texmf
tree.
It is advisable to install fonts as system fonts, such that you don't have multiple copies of a font floating around your directories. If this is not possible for whatever reason then you should place the font files alongside your document in the same directory or maybe, if you use many fonts, in a subfolder solely dedicated to fonts. You may then load the fonts by their relative paths, as in
\setmainfont{fonts/Times New Roman.ttf}
N.B.: I don't like spaces in file names, because some pieces of software tend to break if you don't escape them properly.
\setmainfont
command. I don't know the exact rules for it, but it appears that the simpler this denomination is, the better works.texmf
tree? The closest thing I could find istexmf-local
, which has a fonts folder. Will that work?