9

One time I remember seeing a Q ligature in \setmainfont{EB Garamond} (fontspec, EB Garamond, etc.) that involved a wonderful long swash. Now I don't know how to get it. Contrary to most other questions in this topic, how do I force this big Q?

Here's a (not too) minimal working example:

\documentclass{article}
\usepackage[margin=0.9in]{geometry}
\usepackage{microtype}
\usepackage{fontspec}

\usepackage{xspace}
\defaultfontfeatures{SmallCapsFeatures={Renderer=Basic}}
%\setmainfont{EB Garamond}
\usepackage{multicol}

\def\cm#1{\relax}
\newcommand{\qsec}[1]{{\mbox{}\hfill\scshape #1}}
\newenvironment{qset}[1]{
        \mbox{}\\\qsec{#1}\par\begin{multicols}{2}
    }{
        \end{multicols}
    }
\newcommand{\q}[2]{{\em #1} #2\xspace}
%\def\q#1#2{{{\em #1} #2\xspace}}

\begin{document}
\fontsize{11pt}{14pt}\selectfont
\fontspec[Ligatures={Required,Common,Contextual,Discretionary,TeX},Style=Alternate]{EB Garamond}
\noindent\mbox{Simon Kuang}\hfill\mbox{\today}
\centerline{\emph{Oedipus Rex} Study Guide Questions}
\begin{qset}
{First Episode --- Oedipus, Chorus, and Tiresias}
\noindent \q{Explain the following ironies in Oedipus's speech (218--220; 236--248; 249--251; 259--265).}{Que is.}
\end{qset}
\end{document}
Mico
  • 506,678
Simon Kuang
  • 1,861

1 Answers1

13

Select the font this way:

\setmainfont[Contextuals=Alternate,Ligatures=Rare,ItalicFeatures={Ligatures=Contextual}]{EB Garamond}

This works even for your preferred font size, and with luatex as well as xetex.

If you examine the font in a program like FontForge, you will find that this delicious Q is called Q.long. And if you search for Q.long in the feature file(s) (either using the feature files in the archives from www.georgduffner.at/ebgaramond/ or saving the feature file with FontForge), you’ll see that Georg Duffner, thanks to whom we have EB Garamond, has chosen to make Q.long accessible through the calt feature.

There’s no necessity here: designers of fonts can make alternate glyphs available in different ways. So one needs to study any documentation the designers provide — it’s unfortunate that the ebgaramond package on CTAN omits Georg Duffner’s excellent documentation — or inspect the font with FontForge or similar programs, or experiment.

Thérèse
  • 12,679
  • +1 Could you explain why this works and the original version doesn't? – Alan Munn Sep 15 '13 at 03:34
  • 4
    @AlanMunn it’s the calt feature that isn’t enabled by default in LuaTeX (while it is in XeTeX and most other programs). You can enable it with Contextuals=Alternate or RawFeature=+calt. In the next update (some time in october) I’ll add an option to enable Q.long without contextual rules. – georgd Sep 15 '13 at 10:40