I'm trying to achieve something that I assumed was quite simple but it made me waste an insane amount of time so far.
I'm using XeLaTeX for a document and I'm setting “Arno Pro” as my font. I'm using the same font also for the math mode and I need a formula with bold digits.
MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setmathsfont(Digits,Latin,Greek)[
Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic,
Numbers={Proportional}
]{ArnoPro}
\setmathrm
[Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic
]{ArnoPro}
\fontspec[Path=fonts/]{ArnoPro.otf}
\SetSymbolFont{Digits:m:n}{bold}{EU1}{\zf@family}{m}{n}
\begin{document}
\noindent
$\boldsymbol{bf\ 0123}$\\
$\mathbf{bf\ 0123}$\\
$normal\ 0123$\\
$\mathit{it\ 0123}$\\
$\mathrm{rm\ 0123}$
\end{document}
Now, this works almost perfectly except that only text and symbols are affected, no digits.
I have tried all sorts of combinations, including some with unicode-math
, but to no avail.
What am I doing wrong?
Best Answer
mathspec
is basically a collection of hacks; using a real Unicode Math font is better, if your document deals with mathematics.However, here's a way to get bold digits:
I've used FreeSerif as I don't have Arno Pro.
A full example using instructions with explicit paths for the fonts: