2

In what is below, the \newfont command does not scale the numbers. I would like to know why.

\documentclass{book}
\usepackage{fontspec}
\setmainfont[Ligatures={Common}, Numbers={OldStyle}]{Minion Pro}
\newfont{\myFont}{MinionPro-BoldCn.otf scaled 5000}
\begin{document}
\myFont 123456789 \Huge 123456789
\end{document}
0

1 Answer 1

6

\newfont is the (very) old LaTeX interface for defining a font, but it has always been a low level command. Higher level commands should be preferred when available.

The main problem with \newfont is that it defines a font at a fixed size.

However, fontspec provides \newfontface that looks like what you need:

\documentclass{book}
\usepackage{fontspec}
\setmainfont[Ligatures=Common, Numbers=OldStyle]{Minion Pro}
\newfontface{\myFont}[Scale=5]{Minion Pro Bold Cond}
\begin{document}
1234567890 \myFont 123456789 \Huge 123456789
\end{document}

(use the method that works for you in specifying the font name); I added also normal font digits for comparison.

enter image description here

All fontspec options can be added to \newfontface, for example old style numbers:

\documentclass{book}
\usepackage{fontspec}
\setmainfont[Ligatures=Common, Numbers=OldStyle]{Minion Pro}
\newfontface{\myFont}[Scale=5,Numbers=OldStyle]{Minion Pro Bold Cond}
\begin{document}
1234567890 \myFont 123456789 \Huge 123456789
\end{document}

enter image description here

4
  • thanks but no, I would like the scale numbers to be oldstyle: you see?
    – pluton
    May 7, 2012 at 12:56
  • @pluton I've added the option: it's just a matter of adding Numbers=OldStyle to the options.
    – egreg
    May 7, 2012 at 13:11
  • Thanks. I understand that the global option Numbers=OldStyle is not automatically accounted for?
    – pluton
    May 7, 2012 at 13:26
  • @pluton The options given to \setmainfont are not global: they hold for the main font. Use \defaultfontfeatures for options you want to be set for all fonts defined from that point on.
    – egreg
    May 7, 2012 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .