Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

\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

share|improve this answer
    
thanks but no, I would like the scale numbers to be oldstyle: you see? –  pluton May 7 '12 at 12:56
    
@pluton I've added the option: it's just a matter of adding Numbers=OldStyle to the options. –  egreg May 7 '12 at 13:11
    
Thanks. I understand that the global option Numbers=OldStyle is not automatically accounted for? –  pluton May 7 '12 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 '12 at 13:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.