# EB Garamond: Context Alternatives, but no swashy Q.long

In a book xetex document, I am using EB Garamond in the older version of Georg Duffner (see egregs answer here: Accessing the short-arched f in EB Garamond).

It has the calt feature (contextual alternatives) which substitutes the long version of lower case 'f' with a shorter form when e.g. an 'ä' follows, to prevent collision of the upper arch with the dots of 'ä'.

I like this feature, but unfortunately, the calt option also comes bundled with the upper case Q with the swashy cauda, called Q.long (see: A Big fancy "Q").

How can I have calt in EB Garamond, but leave upper case Qs as they are, that is: do not substitute the normal Q with Q.long? Do I have to fiddle with the font itself or are there tex/xetex commands to control it?

## 1 Answer

I don’t know whether there’s a solution for xetex (which doesn’t mean that there isn’t one), but the reasons which led you to xetex may be satisfied by luatex, in which case you can add a feature, like this:

\documentclass{article}
\usepackage{fontspec}
\directlua{
fonts.handlers.otf.addfeature{
name = "qalt",
type = "alternate",
data =
{
["Q.long"] = "Q",
},
}
}
\setmainfont{EB Garamond}[
Contextuals=Alternate,
ItalicFeatures={Ligatures=Contextual},
RawFeature=+qalt]
\begin{document}
\textit{Quaint} Questions
\end{document}


• Thank you for this one! I hope it will help people using LuaTex. I'm still fascinated how many different tex compilers there are out there. But unfortunately, in my case the book is due to be submitted to the publisher and I do not have the time to switch to LuaTex and learn everything needed to adapt the project accordingly. But I will accept your answer after waiting two or three weeks if somebody happens to have a XeLaTeX solution. Jan 14, 2020 at 20:57