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}
4
  • 1
    Can you post a minimal example that shows the problem? A simple example seems to give the Q you have in mind.
    – Alan Munn
    Sep 15, 2013 at 0:48
  • @AlanMunn Maybe the problem is in all those packages. Sep 15, 2013 at 0:59
  • @AlanMunn Also, this is LuaLaTeX. The swash only goes in XeLaTeX, I guess. Or maybe not? Sep 15, 2013 at 1:03
  • The problem is the font size. If you change 11 pt to 10 pt you will get the long swash. I'm not sure why. (And your example could be a lot more minimal.)
    – Alan Munn
    Sep 15, 2013 at 1:25

1 Answer 1

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.

2
  • +1 Could you explain why this works and the original version doesn't?
    – Alan Munn
    Sep 15, 2013 at 3: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, 2013 at 10:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .