[Tex/LaTex] TeX Gyre fonts in XeLaTeX and LuaLaTeX: call by name or file name

fontspecxetex

Is there any downside of using file names with \setmainfont, except for the fact that it takes more typing?

I ask because I am experiencing problems with using names for TeX Gyre fonts on my Linux Mint box: as explained here, XeLaTeX on Linux will not find TeX-installed fonts by name. Hence, I installed the fonts also system-wide (Ubuntu package tex-gyre), but the font names are different from my Windows box: the spaces are gone, so "Tex Gyre Termes" becomes "TeXGyreTermes" etc. This means that using names, the code becomes system-dependent 🙁
(By the way, should this be considered a bug and reported to the maintainers of the tex-gyre package?)

On the other hand, calling the font by file name should work as long as the font file names are the same – can one trusts that? And is there any other potential problem with using file names?

Thanks

Best Answer

I discussed some of the problems and choices in my article in TUGboat 117 (vol 37 no 3, 2016) at http://tug.org/TUGboat/tb37-3/tb117inn.pdf — it's basically down to how you work, what your workflow is, and how much you wish to trade off the conveniences of one against the inconveniences of the other. Basically, using filenames (and paths) ties your document to one directory structure, but it's more likely to be accurate for you. Using font names is supposed to be more system-independent, but they are sometimes weird and not always obvious.

Related Question