I am using NCM (NewComputerModern) as my main font.
Because I do not like the \mathcal{…}
provided by unicode-math
in the Euler font instead of the Latin Modern
oder Computer Modern
style.
I think that I am switching to Computer Modern Symbol
(cmsy
) with
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
I got the cmd from here.
This causes the \hat{…}
cmd to be slightly off-center if you compare it without unicode-math
in Latin Modern Math
.
The first is with the Euler Font. I think the spacing of the mathcal
letters is being used to set the hat
symbol which causes it to be slightly off-center (I could be wrong though).
How do I get the "correct" position?
This is how it should look like (although the hat symbol has a weird width in this one):
MWE:
\documentclass{scrartcl}
\usepackage{unicode-math}
\setmainfont{NewCM10-Book.otf}
\setmathfont[CharacterVariant=1]{NewCMMath-Book.otf}
\setmathfont[range={scr,bfscr}]{XITS Math}
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\begin{document}
$\hat{\mathcal{J}} \hat{\mathcal{K}} $
\end{document}