13

I'm using XeLaTeX and EB Garamond to produce a facsimile of a 17th-century French pamphlet. EB Garamond, at least with its default settings, seems to select the long-tailed Q only when the Q is followed by at least three more characters:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{EB Garamond}
\begin{document}
\noindent
Qu'il viue\\
Qui soubmettant\\
Quiconque vienne
\end{document}

Output of above example, showing that "Qui" has no long-tailed Q

However, in the original pamphlet the long-tailed Q is used even for shorter words such as "Qui". How can I get my document to use the long-tailed Q for the word "Qui"?

Psychonaut
  • 3,142
  • See https://tex.stackexchange.com/q/133380/7883 – Thérèse Nov 02 '14 at 16:48
  • @Thérèse I tried and it doesn't work (XeLaTeX and LuaLaTeX). – egreg Nov 02 '14 at 16:54
  • @egreg -- might adding an empty box help? – barbara beeton Nov 02 '14 at 16:56
  • @barbarabeeton No, my impression is that the tail is used only if it ends short of the word. In the case of Qaa adding \mbox{} works, not with Qui\mbox{} – egreg Nov 02 '14 at 17:01
  • @egreg Right, because we’re fighting the contextual rules. In luatex we can force the issue by using fontchar{} (http://tex.stackexchange.com/q/120736/7883), but I don’t use xetex much and don’t know if there’s a way to use XeTeXglyph here, since EB Garamond does not play tricks with the Private Use Area (and it’s good that it doesn’t). – Thérèse Nov 02 '14 at 17:01
  • 1
    In luatex you can even write a feature file with sub \Q by \Q.long; so that you don’t need to remember to use the \fontchar{} macro every time Q appears. – Thérèse Nov 02 '14 at 17:05

1 Answers1

12

With XeTeX you can force the glyph with \XeTeXglyph:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Contextuals=Alternate,Ligatures=Rare]{EB Garamond}
\newcommand\Qlong{\XeTeXglyph\the\XeTeXglyphindex "Q.long" \relax}
\begin{document}
\noindent 
\Qlong ui blablab

\end{document}

enter image description here

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Ulrike Fischer
  • 327,261