With unicode-math
, it is recommended to use \symup
to get upright symbols in math-mode, and to use \textnormal
to get upright text, e.g. for text label subscripts. When using the STIX Two fonts, these two commands give inconsistent results.
\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}
\begin{document}
\[
\textnormal{AVfi}_{\textnormal{AVfi}_\textnormal{AVfi}} \qquad \symup{AVfi}_{\symup{AVfi}_\symup{AVfi}}
\]
\end{document}
In the left case, we get nice kerning, and ligatures, but the font size in the subscripts are bad. In the right case, the font size in the subscripts is good, but the kerning and ligatures are bad.
I think the problem is that STIX Two Text doesn't contain the correct glyphs for optical sizes in subscripts.
Is it possible to get good kerning, ligatures, and sizing without modifying the font files? If not, is there an easy way to achieve the desired result using fontforge? I can live without the ligatures, if this causes problems.
\symup
to get symbols in math mode, and not words.\textnormal
with the sizing achieved using\symup
.