Consider the following example:
\documentclass{article}
\usepackage{kpfonts-otf}
% https://tex.stackexchange.com/a/22255
\newcommand\restrict[2]{{% we make the whole thing an ordinary symbol
\left.\kern-\nulldelimiterspace % automatically resize the bar with \right
#1 % the function
\vphantom{\big|} % pretend it's a little taller at normal size
\right|_{#2} % this is the delimiter
}}
\begin{document}
( \restrict{f}{U} = \frac{\restrict{g}{U}}{\restrict{h}{U}} )
\end{document}
One would get the following result with LuaLaTeX:
As you can see, the vertical bars in script size are broken.
Is there some way to fix this behavior?

\fracisn't needed to create the problematic output. The code snippet$\restrict{f}{U} \quad \scriptstyle\restrict{g}{U} \quad \scriptscriptstyle\restrict{h}{U}$gets the job done too. :-) – Mico Sep 26 '22 at 02:20KpMath-Regular.otfis loaded with\setmathfont{KpMath-Regular.otf}[Renderer=Node]. Bug of the Basic renderer? – Daniel Flipo Sep 26 '22 at 17:58