# \setmathfont[range=\sqrt]{...} changes size of integrals [duplicate]

Using the suggestion from this answer, I used the \sqrt sign from Asana Math with TeX Gyre Pagella Math to decrease the height of some inline math. However, this apparently had some unintended side-effects. Take this minimal example:

\documentclass[a4paper, 12pt]{scrreprt}

\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
% comment or uncomment the next line and compare the output
\setmathfont[range=\sqrt]{Asana Math}

\begin{document}

$\int ∫ \sum$

\end{document}


If you compile with or without the line \setmathfont[range=\sqrt]{Asana Math}, the size of the integral sign (but not the sum sign!) changes!

What gives? The integral sign for TeX Gyre Pagella Math is very small to begin with, so this is really uncalled for! Is this a bug? Are there any more unexpected side-effects? How can I avoid this and keep both the \sqrt from Asana Math as well as the bigger integral sign?

For reference, I'm using the version of LuaLaTeX from the Ubuntu 15.04 repositories (it says "This is LuaTeX, Version beta-0.79.1 (TeX Live 2015/dev/Debian) (rev 4971)").

• This is probably a bug in unicode-math. It's more difficult to combine these "tricky" symbols than ordinary letters. Sep 21 '15 at 0:35
• I can reproduce this only with LuaLaTeX, not with XeLaTeX. You “fix” it by adding, as the last declaration, \setmathfont[range=\int]{TeX Gyre Pagella Math}. It seems that math font parameters (all or some of them) are computed from the last loaded font, even if it's with a range option. Sep 21 '15 at 7:33
• @egreg With that, the square root signs are too tall again, though... Sep 21 '15 at 9:30
• I just found that someone encountered a very similar issue here: tex.stackexchange.com/q/95304/51235. Sep 22 '15 at 1:03
• The solution in the linked question indeed works, just add \setmathfont[range={}]{TeX Gyre Pagella Math} as the last font command. Oct 28 '16 at 9:02