I recently installed TeX Gyre Termes, and I noticed that ligatures were present when I compiled with LuaLaTeX, but not with XeLaTeX:
% !TeX program = XeLaTeX
\documentclass{article}
\usepackage{fontspec}
\setromanfont{TeXGyreTermes} % no spaces in name
\begin{document}
fi ff fl ffi
\end{document}
The same problem arises with small caps- in LuaLaTeX, all works well, but upon switching to XeLaTeX, small caps disappear, and XeLaTeX warns me that it must substitute with normal TeX Gyre Termes instead of small caps. I suspect that the issue is related to my installation of TeX Gyre Termes, as ligatures are present when other fonts are used. However, I have tried re-installing TeX Gyre Termes multiple times, but this issue persists.
Therefore, my question is: because I am unable to use a functional copy of TeX Gyre Termes, and because XeLaTeX compiles faster than LuaLaTeX, what can I do to ensure that ligatures appear when I compile with XeLaTeX?
(I do not want to switch out TeX Gyre Termes with another Times-like font, as I prefer its italic best. However, I do not care whether the OpenType version of the font is used or not.)
This question seems related: What are the incompatibilities of pdftex, xetex and luatex? However, it does not discuss the reason behind this difference, and what may be done about it.


ffmaking aflligature? :-) for me it works and gives ligatures in xelatex texlive 2017 with\setromanfont{TeX Gyre Termes}or\setromanfont{texgyretermes-regular.otf}The version with the font name but spaces removed fails to find the file at all. – David Carlisle Jan 15 '18 at 01:12\setromanfont{TeX Gyre Termes}should work under both XeLaTeX and LuaLaTeX. – Mico Jan 15 '18 at 01:59TeXGyreTermes; that is to say, if I opened Microsoft Office, then the font name would still appear asTeXGyreTermesand would not appear asTex Gyre Termes. – gz839918 Jan 15 '18 at 03:11\setromanfont{texgyretermes-regular.otf}form – David Carlisle Jan 15 '18 at 07:51tex-gyreinstalled via MikTeX's Package Manager (Admin) the MWE works for me if I use\setromanfont{TeX Gyre Termes}with spaces. If I compile the MWE without spaces the ligatures are only shown with LuaLaTeX. – moewe Jan 15 '18 at 09:26texgyretermes-regular.otfseems to do the trick for XeLaTeX, although like the image in my original post, the ffi ligature still does not appear (instead an ff ligature is followed by a letter i). At any rate, I am satisfied with the results of what you suggested in your comment; if you convert it into an answer, I may accept it (depending on whether Ulrike changes his answer). Thank you for your help! – gz839918 Jan 17 '18 at 23:56