I am trying to use Lua to substitute the default ampersand for a swashy one. Fontforge tells me the glyph's name is 'ampersand', and the swashy version is 'u0026.da'. However, I can't get the swash to appear, unlike for other characters:
\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{Arno Pro Italic}
\directlua{
fonts.handlers.otf.addfeature{
name = "italt",
type = "alternate",
data =
{ampersand = "u0026.da",
J = "J.b"}}
}
\begin{document}
\& J\addfontfeature{RawFeature={+italt}} \& J
\end{document}