In ligature-rich Opentype fonts which feature both "common" and "rare" ligatures, it can happen that a "rare" ligature is applied first to one character pair, pre-empting the use of a "common" or "rare" ligature that ought to be applied to the preceding or trailing character pair. (Regarding ligature terminology in Opentype fonts: Most, but not all, Opentype font families I'm familiar with classify the f-ligatures -- ff, fi, fl, ffi, ffl, and possibly also ft, fft, and a few more -- as "common" and all others as either "rare"/"discretionary" or "historic". )
Two examples of this behavior, which can arise with both XeLaTeX and LuaLaTeX:
With the font
Garamond Premier Pro, the "rare"isligature is applied first to words such asfishandfist, pre-empting the use of the "common"filigature.With the font
Junicode, the "rare"ivandixligatures are applied first to words such asfive,fix, andaffixed, pre-empting the use of the "common"fiandffiligatures.
Without this pre-emption, the output would look like this (achieved the "brute force" way, i.e., by inserting \kern0pt between i and s, i and v, and i and x, respectively):
(Observe, by the way, that the brute-force suppression of the rare is ligature in the word "fist" not only enables the common fi ligature but also the rare st ligature.)
Question: Which methods may be available -- ideally on a document-wide basis -- that prevent the application of certain rare ligatures if they pre-empt other, either common or rare, ligatures?
Aside: This posting is not a duplicate of the earlier posting How to suppress a "Rare" ligature that pre-empts a "Common" ligature for the same character pair? In the earlier question, the issue was that "rare" and "common" forms of a given ligature could be present for one and the same character pair (or triple). Examples of this issue are common and rare forms of ligatures for "ft" and "fft".
Here's the code that gives rise to the second screenshot shown above; remove the \kern0pt directives to generate the first screenshot:
% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont[Ligatures = Rare,
ItalicFont = {Garamond Premier Pro Italic}]
{Garamond Premier Pro}
% 'is'-ligature available only in italic shape in GPP
\emph{fi\kern0ptsh fi\kern0ptst} --- Garamond Premier Pro
\setmainfont[Ligatures = Rare]{Junicode}
fi\kern0ptve fi\kern0ptx affi\kern0ptx --- Junicode
\end{document}



luaotfload, as it can arise under XeLaTeX as well as under LuaLaTeX. Note also that it doesn't affect all font families which feature both common and rare ligatures. For instance, theisligature does not pre-empt thefiandstligatures ifEB Garamondis used instead ofGaramond Premier Pro. I don't have access to desktop publishing packages such as InDesign; hence, I can't tell if this issue arises with other software as well. – Mico Feb 29 '16 at 10:180ptkern suppresses defined kerning, which appears to be needed. – barbara beeton Feb 29 '16 at 17:22{}-method of preventing ligatures does not work at all under Lua(La)TeX -- and it doesn't even work 100% of the time under pdf(La)TeX. Inserting an italics correction wouldn't be right for the case at hand, since there should be no gap between, say,fiandstin the wordfist. – Mico Feb 29 '16 at 18:090ptis inserted. try setting "is" with and without that kern; i think you'll see that without the explicit kern, the two letters are a wee bit closer together. ("defined" kerns are the reason why it's so complicated to define a good letterspacing macro.) – barbara beeton Feb 29 '16 at 18:41\em is\kern-5.45pt\color{red}i\kern0ptsproduces a perfect overlay, i.e, the black and redi's and the black and reds's, respectively, are perfectly on top of each other. I'm thus not so sure that the zero-width kern eliminates any (horizontal) whitespace between the letters. – Mico Feb 29 '16 at 20:21ixcharacter pair, with and without\kern0ptbetweeniandx, using both LuaLaTeX and XeLaTeX. – Mico Feb 29 '16 at 20:38