This is a follow-up question to Switching from PDFLaTeX to LuaLaTeX. Using user187802's answer, I have the following setup:
\documentclass{article}
\usepackage{fontspec}
\setmainfont[
Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
Ligatures = {
TeX,
CommonOff
}
]{NewCM10}
\usepackage[
math-style = TeX,
warnings-off = {
mathtools-colon
}
]{unicode-math}
\setmathfont{NewCMMath-Regular.otf}
\setmathfont[
version = bold,
FakeBold = 2
]{NewCMMath-Regular.otf}
\usepackage{polyglossia}
\setdefaultlanguage{danish}
\begin{document}
Test.\footnote{`12345' versus `$12345$'}
\end{document}
As can be seen in the output, neither the font size nor the font boldness in text mode and math mode are the same. (It doesn't just occur in footnotes but elsewhere the difference is more subtle.)
How can I get the exact same font size and font boldness for text mode and math mode when using the NewCM10
font?
lmodern
package, or you could re-instate the computer modern fonts.