If I try to set up an independent font specifically for \mathit
and/or \mathbf
using
\setmathfont[range = it]{some italic font}
\setmathfont[range = bf]{some bold font}
unicode-math will not change it and just leave the default latex font. Other ranges do work, i.e. bfit
and up
. Haven't tested others...
it
has a special issue. It falls back to vanilla latex italic font, Computer Modern or however it is called. If a different font was set using fontspec
then it will fall back to its italic variant.
Code:
\documentclass{article}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{calc, geometry}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont[StylisticSet = 008]{STIX Two Math}
\setmathfont[range = bfup]{some upright bold font}
\setmathfont[range = it]{some italic font}
\begin{document}
\[ \mathbfit{F=ma} \quad \mathbf{F=ma} \quad F=ma \quad \mathit{F=ma}\]
\end{document}
$$
for display maths in LaTeX. LaTeX-2e made it obsolete decades ago.some italic font
. There, your example appears to include settings for the ranges you give here (and some more), and you've said that Will's answer solved the problem there. So what's the new question exactly?texgyrepagella-regular.otf
,texgyrepagella-math.otf
and so on and so on.