Bug with \setmathfont range?

I am using XeLaTeX and unicode-math with the Libertinus Math font. Some symbols are missing therefore I'm using the range command. Then I get an unwanted crossed-square symbol beside big curly braces. Here is a MWE.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
% The seemingly useleess command below is needed for a different known bug
\setmathfont[range={\int}]{Libertinus Math}
\begin{document}
$\Bigl\{\Bigr\}$
\end{document}


Known bug in the comment above: Unicode-math changes font outside of range

Does anybody know if this is a known bug? Is there a solution?

EDIT: I just found a workaround here. Is there a "cleaner" solution?

• The bug has been fixed with unicode-math version 0.8j, released 2018-01-07. – egreg Jan 10 '18 at 12:03

You can reset the delcode:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
% The seemingly useleess command below is needed for a different known bug
\setmathfont[range={\int}]{Libertinus Math}
\ExplSyntaxOn
\__um_set_delcode:nnn {operators} {\.} {\c_zero}
\ExplSyntaxOff
\begin{document}
$\Bigl\{\Bigr\}$
\end{document}


But it would be better if this were corrected in unicode-math (or xetex if it indicates a xetex bug).

• Thanks, I'm hoping to look into all of these problems shortly... – Will Robertson Oct 23 '17 at 12:51
• @WillRobertson On the whole I think it is a xetex peculiarity. It seems to handle the dot in the operators family (fam0? I never remember this) differently than in other families. So it is probably best to hardcode this delcode. – Ulrike Fischer Oct 23 '17 at 12:57
• — I remember hardcoding this already in general (inside \wspr81@gmail.com_setup_delcodes: in the source) so I suspect you're right that hardcoding it for operators` and so on is also needed. – Will Robertson Oct 25 '17 at 0:56