Dear Hans (and others),

In the tex stackexchange chat today we were discussing the stix two fonts, and in particular the spacing between the integral sign and the lower bound. It is known that this was way to big before (see https://tex.stackexchange.com/q/327710/52406), but it seems that it is still too big, at least if one uses the upright version. Judge yourself from the example file at the end of this email (result attached).

I made a bug report (see https://sourceforge.net/p/stixfonts/tracking/95/) but Ulrike Fischer said that it could take time to get it fixed, and that you Hans made a fix for another bug (https://sourceforge.net/p/stixfonts/tracking/86/) in the fontloader.

Can you do that for this one as well?

During the discussion Harald Hanche-Olsen came up with the following "quick fix" for LuaLaTeX:

\usepackage{luatexbase,luacode}
\begin{luacode}
local patch_stixmath = function (fontdata)
 if fontdata.psname == "STIXTwoMath"
 then
  fontdata.characters[983352]["italic"]=3*fontdata.characters[983352]["italic"]
 end
end
luatexbase.add_to_callback
 (
  "luaotfload.patch_font",
  patch_stixmath,
  "change_stixmath"
 )
\end{luacode}

I don't know if this is the way to go, but I thought I should include it.

Best regards, Mikael

%%% TEST FILE %%%
\setupbodyfont[stixtwo]

\setupmathematics[
integral=nolimits,
]

\startTEXpage[offset=3bp]

With slanted integral:

\startformula
\int_0^\pi \sin x\,dx=2.
\stopformula

\setupmathematics[stylealternative={upright}]

With upright integral:

\startformula
\int_0^\pi \sin x\,dx=2.
\stopformula

\stopTEXpage