Open u-fischer opened 6 years ago
Thanks Ulrike — the answer to your ultimate question is easy: a complete oversight. Things might have changed here since these defaults were first set up. Are you implying that removing the default of Renderer=Basic
would be okay? (My original understanding was that mode=node
wouldn't work for a maths font but I forget the reasons/context.) I could also load more than one maths font with the different mode
setups if necessary.
Hans wrote on the context list that after an investigation he and Luigi "found a possible issue with the lig builder part". So probably the underlying problem will be gone someday.
I have no idea if a \mathXX
font should better use mode=node or mode=basic (and if it matters). But I asked on the context list.
I found the reason why the mode matters: ligatures and kerning
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{STIX Two Text}
\setmathfontface\mathtestbase{STIX Two Text}[Renderer=Basic]
\setmathfontface\mathtestnode{STIX Two Text}% mode = node
\begin{document}
$\mathtestnode{VA fin}$ (node mode)
$\mathtestbase{VA fin}$ (base mode)
\end{document}
See also https://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families
Description
luatex fails for some font/char combination when math alphabets are defined with mode=base with the error
Check/indicate
Minimal example demonstrating the issue
Further details
I came across this error from https://github.com/khaledhosny/libertinus/issues/166 and pulled it down to the example above. The error is triggered by the following conditions:
\mathrm{fh\int}
fails too).The underlying problem is probably in the fontloader and I will ask on the context list. But for
unicode-math
the question is why the "automatically" defined math alphabets like\mathrm
are setup withRenderer=Basic
while\setmathfontface
uses node mode.