I am trying to change the stylistic set used for italic y in my document. I used Alan Munn's method, explained here: Use stylistic set variations only for certain glyphs.
It works properly, except that it interferes with the kerning. (I believe this problem may be related to Emerson's: Glyph alternates break hyphenation.)
Is there a fix?
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Arno Pro}
\begin{document}
\textit{y} -- \textit{y.} -- y. % Proper kerning.
\XeTeXinterchartokenstate=1
\newXeTeXintercharclass\myalt
\XeTeXcharclass `y \myalt
\XeTeXinterchartoks 0 \myalt = {\begingroup\addfontfeature{Style=Alternate}}
\XeTeXinterchartoks \myalt 0 = {\endgroup}
\XeTeXinterchartoks 255 \myalt = {\begingroup\addfontfeature{Style=Alternate}}
\XeTeXinterchartoks \myalt 255 = {\endgroup}
\textit{y} -- \textit{y.} -- y. % No kerning (esp. after the upright y).
\end{document}
This example is shown here:

