I would like to use KpMath as my main math font, but also to use the letters and numbers from usual Palatino to match my main text. For this purpose, I replaced the letters and numbers from the font texgyrepagella-math.otf
. However, in doing so, the space before the letter f
becomes too small:
which should be like
Of course I can fix this in my document by manually add a \,
before each letter f
. However, it would cause a lot of trouble if one wishes to change the font afterwards. Is it possible to simply modify this spacing?
Below is a MWE.
\documentclass{article}
\usepackage{unicode-math}
\ExplSyntaxOn
\setmathfont { KpMath-Regular.otf }
\setmathfont { texgyrepagella-math.otf }
[
range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
]
\setmathfont { KpMath-Regular.otf } [ range = {} ]
\ExplSyntaxOff
\begin{document}
\( (f) \)
\( f_i f_j \)
\( 123 \)
\end{document}
TeXbyTopic
has four chapters on math, and chapter 7 ofluatex.pdf
looks useful for lua code. Mix-and-match of fonts is basically entering font-design space, and math mode is totally different to text mode, so big topics, hence specific scope required would be helpful to get an answer.