2

The font Cronos Pro includes a long-tailed Q glyph that I can access in the typography pane of Mac's TextEdit. However, I cannot seem to get, despite playing with raw feature to try to trigger contextuals, the glyph to appear in Fontspec. Is there a way to do this? My non-working code is below; please note that I have also tried +aalt, but this merely messed up every letter other than the Q (which remained short-tailed).

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont[RawFeature={+calt,+liga,+dlig,+hlig,+onum,+pnum,+swash},]{Cronos Pro}
\begin{document}
    Queen
\end{document}
ezgranet
  • 564
  • 2
    I don’t have the font, but it looks as if it’s defined as a stylistic alternate (+salt). – Thérèse Jun 17 '21 at 19:26
  • @Thérèse Well, that brilliantly gets me the Q-swash (thank you !!) , but it also creates lowercase e-swash (ugh)—is there a way to activate only 1 letter's +salt ? – ezgranet Jun 17 '21 at 20:21
  • 1
    Are you using xetex or luatex? I rarely use xetex and don’t know much about it, but luatex allows you to make your own font features (see https://tex.stackexchange.com/q/312154 for examples). – Thérèse Jun 17 '21 at 20:35
  • @Thérèse xetex .... took me a bit to figure it out, but interchartoks did it. – ezgranet Jun 17 '21 at 21:55

1 Answers1

2

With thanks to @Thérèse for the tip to look at +salt, I solved this using XeLaTeX interchartoks :

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{Cronos Pro}

\XeTeXinterchartokenstate = 1 \newcommand{\style}{\addfontfeature{RawFeature=+salt}} \newXeTeXintercharclass \mydigitsclass \XeTeXcharclass `\Q \mydigitsclass \XeTeXinterchartoks 0 \mydigitsclass = {\begingroup\style} \XeTeXinterchartoks 4095 \mydigitsclass = {\begingroup\style} \XeTeXinterchartoks \mydigitsclass 0 = {\endgroup} \XeTeXinterchartoks \mydigitsclass 4095 = {\endgroup}

\begin{document} Queen% \XeTeXinterchartokenstate = 0% Queen \end{document}

queen queen

ezgranet
  • 564