# Stylistic set substitution doesn't work in subscript with unicode-math

I am using TeX Live 2018 with all packages up-to-date.

Minimal example:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont[StylisticSet=2]{STIX2Math.otf}
\begin{document}
$$\max_g g$$
\end{document}


I compile the file with xelatex and I get:

The subscript g does not change to the variant form. Is this a bug of unicode-math or the STIX2Math font?

• With LuaLaTeX it works, it seems that XeLaTeX does not change the letters for \scriptstyle and smaller, see \max_g g \scriptstyle g \scriptscriptstyle g or better \displaystyle g \textstyle g \scriptstyle g \scriptscriptstyle g. (Tested on MikTeX 2.9 all packages updated this morning.) Jul 17, 2018 at 13:46
• Probably one for github.com/wspr/unicode-math/issues Jul 17, 2018 at 13:49