I would like to access some alternative glyph forms using fontspec. To be specific I am using the font Garamond Premier Pro and I would like to use the alternative forms of Q (Glyph 245), W (Glyph 246) and & (Glyph 301). The font has 4 stylistic sets but using them through fontspec does not impact the shape of the letter mentioned.
Here is minimal code that still has the issue:
\documentclass{article}
\usepackage[no-math]{fontspec}
\setmainfont[Ligatures=Common, StylisticSet={1,2,3,4}]{Garamond Premier Pro}
\title{Title}
\begin{document}
\maketitle
Test: WQ\&.
\end{document}
PS: Using Style= Alternate
in fontspec changes everything not just the three letters (it also picks an alternative form of & that I do not want).
PPS: The issue is present both with XeLaTeX and LuaLaTeX.
Best Answer
I don’t know whether we have the same version of the fonts, because the glyph numbers you mention don’t match what I see. But in LuaTeX, you can do this (adjust the name of the ampersand glyph to
ampersand.alt2
orampersand.alt3
if the one shown is not the one you wanted):If you’d rather not need to remember to add
{\addfontfeature{RawFeature=+oops}...}
whenever a small caps ampersand comes into view, just invokefontspec
like this in your preamble:See How to adjust font features in LuaTeX? for more detail. For glyphs with long tails, defining a contextual alternate is often preferable.