Consider the following MWE:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{HelveticaNeue.ttc}[
UprightFeatures = {FontIndex=0}
]
\begin{document}
ff fi fl ffi ffl
\end{document}
When I compile it using LuaLaTeX, no ligatures appear. Yet when I examine the relevant subfont in FontForge, each of the expected ligature glyphs appear at Latin Ligatures. (The only clear difference is that in ff, ffi and ffl, the fs are joined.)
Adding Ligatures = Common, Rare, Historical, Contextual, or Required results in the following error message:
Package fontspec Warning: OpenType feature 'Ligatures=Common' (liga) not
(fontspec) available for font 'HelveticaNeue' with script
(fontspec) 'CustomDefault' and language 'Default'.
Inserting the following after \usepackage{fontspec} as suggested in this answer has no effect:
\directlua{
fonts.handlers.otf.addfeature{
name = "liga",
type = "ligature",
data = {
['f_f'] = { "f", "f" },
['f_i'] = { "f", "i" },
['f_f_i'] = { "f", "f", "i" },
['f_l'] = { "f", "l" },
['f_f_l'] = { "f", "f", "l" },
},
}
}
How can I enable these ligatures in HelveticaNeue.ttc using LuaLaTeX?
\setmainfont{Helvetica Neue}for that. – solisoc Jul 27 '19 at 15:38tlmgr auxtrees add path/to/the/texmf. You probably will have to delete the font caches first, so expect that it will take some time until they are recreated. (I'm assuming that you are on a mac ...) – Ulrike Fischer Jul 27 '19 at 15:54tlmgr conf auxtrees add path/to/the/texmf. I also executedluaotfload-tool --cache=eraseto delete the font caches. Upon rebuilding the MWE, no luck. – solisoc Jul 27 '19 at 16:15