Description
This is relevant to lualatex.
When I set a mathfont, and then replace only a certain range of characters with another range, some spacing/scaling rules of this second font are used for the entire document, even when this does not contain any characters of this range. Please consider this MWE:
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Noto Sans}
\setmathfont{Asana Math}
% \setmathfont{Tex Gyre Bonum Math}[range={bb}]
% \setmathfont{Asana Math}[range={}]
\begin{document}
$s = \left \lBrack \left ({\displaystyle \prod_{min}^{max}},\text{g}\right ) \right \rBrack_{\mathup{m}}$
$s = \left \lBrack \left (i,\text{g}\right ) \right \rBrack_{\mathup{m}}$
\end{document}
Produces:
Uncommenting the first commented line (note how the range does not occur anywhere in the document, so it should, in theory not affect any character) produces:
in which the size of the double-struck brackets is differnt in the second line, as is the position of the subscripts and superscripts on the product and the right bracket.
Uncommenting the 2nd comment line produces the first image again, suggesting that some spacing/scaling rules of whatever font was last set is in effect, even when all characters belong to a different font.