I'm using function restriction notation like here, but after switching to XeLaTeX with unicode-math I noticed that it looks slightly odd. Here's a minimal working example
\documentclass{minimal}
\usepackage{unicode-math}
\begin{document}
\[
\left. \frac{dy}{dx} \right\vert_{x=5} \quad
\left. y \right\vert_{x=5}
\]
\end{document}
Here's the output with unicode-math:
and here it is without unicode-math:
Apparently with unicode-math delimiters are shorter and the baseline of subscripts is lower.
Ideally I would like the bottom of the vertical bar to extend to the baseline of the subscript, and at the same time keep the automatic scaling of the delimiter wrt. the expression on the left of it.
How could I achieve this?
In case it's relevant: I'll be using texgyrepagella-math font.