Consider the following example:
\usepackage{unicode-math}
\setmathfont{Asana-Math.otf}
% \setmathfont{KpMath-Regular.otf}
\begin{document}
( \left. g \right| ) ( \left. h \right| )
( \scriptstyle \left. g \right| ) ( \scriptstyle \left. h \right| )
\end{document}
As you can see, the automatic vertical bar is too long for the letter g for this font (this also happens for f, j, p, q and y). Taking KpMath as comparison:
Is there some way to fix this behavior? (Since I'm using LuaLaTeX, it would be nice to have a Lua solution if general solution is not available.)


fwith the font TeX Gyre Pagella Math that had me switched to Asana Math: see my previous question. – Jinwen Sep 28 '22 at 04:10\restriction{g}is normal-size, but\restriction*{g}auto-sizes and\restriction[\big]{g}specifies an exact size. – Davislor Sep 28 '22 at 04:28