# Accessing Junicode ligatures

\documentclass{article}
\usepackage{fontspec}

\setmainfont{junicode}
%\setmainfont[Ligatures=Discretionary]{junicode}

\begin{document}
fifty
nifty
activity
\end{document}


This will produce fty ligatures, but not a ty lig. in the last word.

Commenting out to use ‘discretionary’ ligatures will enable ty but disable fty. How can I enable both?

• I'm afraid you can get only what the font provides. If it has bad tables, you can possibly fix them with Fontforge. – egreg Mar 30 '16 at 18:02
• @egreg, or with a feature file? – Toothrot Mar 30 '16 at 18:07
• With LuaTeX, perhaps. – egreg Mar 30 '16 at 18:11
• Solved it from this: tex.stackexchange.com/questions/142605/… --, adding a feature file with feature liga { sub t y by t_y; } liga; – Toothrot Mar 30 '16 at 19:53
• You may add a self-answer – egreg Mar 30 '16 at 19:54

Use a feature file to add the ty (and other desired) ligatures to the liga feature.

\documentclass{article}
\usepackage{fontspec}
\usepackage{filecontents}

\begin{filecontents*}{junicode.fea}
languagesystem DFLT dflt;
languagesystem latn dflt;

feature liga {
sub t y by t_y;
} liga;
\end{filecontents*}

\setmainfont[FeatureFile={junicode.fea}]{junicode}

\begin{document}
fifty
nifty
activity
\end{document}


• Ummm, this code does not provide an answer to the issue you raised in the posting. The fty ligature is in the "Common" group of ligatures, and it gets employed whether or not the feature file is loaded -- as long as "Discretionary" ligatures aren't loaded as well. If the "Discretionary" (aka "Rare") group of ligatures is loaded, the feature file approach (with sub f t y by f_t_y in the "liga" feature) does not work, and the ty ligature is employed -- whether or not the feature file is loaded. Please provide an approach that solves the issue raised in the posting itself. – Mico Mar 30 '16 at 22:26
• @Mico, the question was how to enable both ligatures at the same time, and that q. has been answered. An alternative is probably to add f_t_y to the dlig feature. – Toothrot Mar 30 '16 at 22:35
• I had read your original question as asking how to (re)enable the fty ligature if the Discretionary/Rare group of ligatures is activated. It would be helpful if your answer showed explicitly how this might be accomplished via a feature file approach. If, on the other hand, your question was not about discretionary ligatures, it might be helpful if you edited your posting to clarify the posting's objective. – Mico Mar 30 '16 at 22:47
• @Mico, frankly I think I indicated with sufficient clarity that I was interested in the ligatures and not the ligature groups. The question was ‘how could I enable both [ligatures]’. If you disagree you are welcome to edit the question or give a better answer. – Toothrot Mar 30 '16 at 23:07