0

I'm trying to use the Noto font for my entire document. Using mathspec this works fine for text and math fonts. However, using a comma in math mode produces a serif font-like comma instead of the one provided by the Noto font family. How can I change that? Here's a minimal example:

\documentclass[a4paper,12pt]{scrartcl}
\usepackage{amsmath}
\usepackage{mathspec}
\setmathrm{NotoSans-SemiCondensedLight}
\setmathfont(Latin){NotoSans-SemiCondensedLightItalic}
\setmathfont(Digits){NotoSans-SemiCondensedLight}
\setmainfont{NotoSans-SemiCondensedLight}
\begin{document}
\noindent 1,234\\
$1{,}234$
\end{document}

which yields

enter image description here

EDIT:

Using the proposed lines

\makeatletter
\DeclareMathSymbol{,}{\mathpunct}{\eu@LatinLowercase@symfont}{`,}
\makeatother

yields a somewhat similar, but not identical comma symbol compared to the main and math fonts (see below). Is there a way to use the exact same comma from the same font?

enter image description here

frixhax
  • 153
  • I read that post, however, the author's example is more extensive and I find it difficult to apply the proposed solution to my problem. I would ask for the simplest fix with regard to my minimal example. – frixhax Jul 10 '19 at 18:52
  • 1
    You can copy the proposed solution to your preamble at it will fix the issue. If you want a minimal solution, you can remove all but the first line between \makeatletter and \makeatother. – Ralf Stubner Jul 10 '19 at 18:56
  • Better, but not yielding the original font (see above). – frixhax Jul 10 '19 at 19:07
  • Yields the identical output as shown above. – frixhax Jul 10 '19 at 19:19
  • 2
    The comma in the formula comes from italic shape. If you are loading fonts using their font names, you could directly use \setmathfont(Latin){Noto Sans Semi Condensed Light} (this sets Latin italic by default), not \setmathfont(Latin){Noto Sans Semi Condensed Light Italic}. But another fix is to use \DeclareMathSymbol{,}{\mathpunct}{\eu@DigitsArabic@symfont}{\,}`, because the digit font gives you upright comma. – Ruixi Zhang Jul 10 '19 at 19:27
  • Thanks, that's what I was suspecting now but didn't figure out how to fix. The first solution wouldn't work, since I want the mathfont to be italic in formulas and expressions, just not the comma between digits. Therefore, the second solution works fine. – frixhax Jul 10 '19 at 19:29
  • 1
    Possibly better duplicate: https://tex.stackexchange.com/q/74140/4427 – egreg Jul 10 '19 at 21:32

0 Answers0