# How should one setup fontspec package to exploit best features of Pro fonts ?

Suppose that you have a Pro class fonts such as Adobe Arno which has several design sizes as described below:

Design    Size  Size Ranges
Caption:   8    point 5–8.5 point
SmText:   10    point 8.6–11
Regular:  12    point 11.1–14 point
Subhead:  18    point 14.1–21.5 point
Display:  36    point 21.5+ point


Arno Pro is supplied as set of the following font files:

ArnoPro-Bold.otf
ArnoPro-BoldCaption.otf
ArnoPro-BoldDisplay.otf
ArnoPro-BoldItalic.otf
ArnoPro-BoldItalicCaption.otf
ArnoPro-BoldItalicDisplay.otf
ArnoPro-BoldItalicSmText.otf
ArnoPro-BoldItalicSubhead.otf
ArnoPro-BoldSmText.otf
ArnoPro-BoldSubhead.otf
ArnoPro-Caption.otf
ArnoPro-Display.otf
ArnoPro-Italic.otf
ArnoPro-ItalicCaption.otf
ArnoPro-ItalicDisplay.otf
ArnoPro-ItalicSmText.otf
ArnoPro-ItalicSubhead.otf
ArnoPro-LightDisplay.otf
ArnoPro-LightItalicDisplay.otf
ArnoPro-Regular.otf
ArnoPro-Smbd.otf
ArnoPro-SmbdCaption.otf
ArnoPro-SmbdDisplay.otf
ArnoPro-SmbdItalic.otf
ArnoPro-SmbdItalicCaption.otf
ArnoPro-SmbdItalicDisplay.otf
ArnoPro-SmbdItalicSmText.otf
ArnoPro-SmbdItalicSubhead.otf
ArnoPro-SmbdSmText.otf
ArnoPro-SmbdSubhead.otf
ArnoPro-SmText.otf
ArnoPro-Subhead.otf


How should one setup fontspec package to exploit best features of these fonts?

Starting code is here:

\usepackage{fontspec}
\setmainfont[Renderer=Basic,Ligatures={TeX}]{ArnoPro}


Would it be sufficient? I am not sure that Caption version of these fonts will be invoked by the \small or \footnotesize switches. What should one add here?

Added at 2nd edit

I mean that in standard LaTeX classes font size declarations are bounded to optical sizes according to the following table:

 declaration \ class option  10pt      11pt       12pt

\tiny                        5pt       6pt        6pt
\scriptsize                  7pt       8pt        8pt
\footnotesize                8pt       9pt       10pt
\small                       9pt      10pt       11pt
\normalsize                 10pt      11pt       12pt
\large                      12pt      12pt       14pt
\Large                      14pt      14pt       17pt
\LARGE                      17pt      17pt       20pt
\huge                       20pt      20pt       25pt
\Huge                       25pt      25pt       25pt


Hence, for 10pt class option, \tiny, \scriptsize, \footnotesize should switch to Arno Pro Caption, \small, \normalsize to Arno Pro SmText, \large and \Large to Arno Pro, \LARGE and \huge to Arno Pro Subhead, and \Huge to Arno Pro Display. All these fonts are actually diffrent, when scaled to same size, so that Caption version looks better for \footnosize than Regular vesrion.

-
Looks good to me; is there anything going wrong? (Of course, it depends how lucky you are that the optical sizes have been found automatically.) –  Will Robertson Jun 22 '11 at 9:10
@Igor: These fonts are designed almost only for literary books, and didn't go well for mathematics and physics books. For English, or other Latin alphabet based language, they are acceptable to some degree. But for Russian mathematics and physics books - please don't use them. They are too far from what the Russian reader is trained to read. And that will create a learning overhead until the reader gets familiar with the font. Ну просто не подходят эти шрифты. :) –  Karl Karlsson Jun 22 '11 at 10:06
@Karl, suppose that Arno Pro breaks some traditions in Russian science books, though I don't know which tradiations namely it breaks. Advice, please, then what fonts are good for Russian books. –  Igor Kotelnikov Jun 22 '11 at 11:22
Arno, Minion and Garamond are Old style Serifs, по русский Антиква старого стиля. While the two fonts used in almost all Soviet and Russian math and physics books, namely Literaturnaya (Литературная) and New Standard (Обыкновенная новая) are respectively... –  Karl Karlsson Jun 22 '11 at 13:52
...Latin serif = Антиква латинского стиля and Modern Serif = Антиква нового стиля (классицистическая). Computer Modern is similar to New Standard and is Modern Serif too. Times New Roman is somewhat similar to Literaturnaya, although it is Transitional Serif (Переходная Антиква), not Latin Serif. So, in short Old style Serifs are uncommon for Russian. –  Karl Karlsson Jun 22 '11 at 13:57
show 4 more comments

## 2 Answers

Answer to my question occurred to be rather simple. There is no need to invent sophisticated font loading procedure. fontspec package occurred to be smart enough to select correct font shape for every size. To check that one need to run the following simple test:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont{Arno Pro}

\begin{document}%
\newcommand{\MyText}{No offence meant, I even upvoted your answer.}

\verb|\tiny|=\tiny\MyText\par
\verb|\scriptsize|=\scriptsize\MyText\par
\verb|\footnotesize|=\footnotesize\MyText\par
\verb|\normalsize|=\normalsize\MyText\par
\verb|\large|=\large\MyText\par
\verb|\Large|=\Large\MyText\par
\verb|\LARGE|=\LARGE\MyText\par
\verb|\huge|=\huge\MyText\par
\verb|\Huge|=\Huge\MyText\par

\end{document}


Then I exported the compiled PDF to MS World and saw that \tiny \scriptsize and \footnotesize are typed by Arno Pro Caption as it should be, and \normalsize is typed by Arno Pro SmText as expected, e.c.t.

Great!

Unfortunately, LuaLaTeX on my computer [Version beta-0.70.1-2011052811 (rev 4277) (format=lualatex 2011.6.23)] did not manage to compile that short example, but XeLaTeX have that done very quickly.

-
Actually it's XeTeX that automatically selects the optical sizes. But you can use fontspec to fine tune things if necessary (the syntax is a bit verbose, though). –  Will Robertson Jun 23 '11 at 13:08
add comment

it also works with lualatex but it takes a lot of time for luatex to create the cache for the font files:

...
(load: /home/voss/.texlive2011/texmf-var/luatex-cache/generic/fonts/otf/temp-ar
nopro-display.lua)(save: /home/voss/.texlive2011/texmf-var/luatex-cache/generic
/fonts/otf/temp-arnopro-display.lua)
Overfull \hbox (15.88963pt too wide) in paragraph at lines 17--17
[][][]\EU2/lmtt/m/n/20.74 \Huge\EU2/ArnoPro(0)/m/n/20.74 =\EU2/ArnoPro(0)/m/n/2
4.88 No of-fence meant, I even up-voted
[1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./latex6.aux) )
275 words of node memory still in use:
2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 40 glue_spec, 3 attribute_lis
t, 1 write nodes
avail lists: 2:1551,3:13,4:158,5:179,6:470,7:2,9:34,10:27
</home/voss/.fonts/ArnoPro/ArnoPro-Display.otf></home/voss/.fonts/ArnoPro/ArnoP
ro-Subhead.otf></usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmm
ono12-regular.otf></home/voss/.fonts/ArnoPro/ArnoPro-Regular.otf></usr/local/te
xlive/2011/texmf-dist/fonts/opentype/public/lm/lmmono8-regular.otf></home/voss/
.fonts/ArnoPro/ArnoPro-Caption.otf></home/voss/.fonts/ArnoPro/ArnoPro-SmText.ot
f></usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmmono10-regular
.otf>
Output written on latex6.pdf (1 page, 33812 bytes).

Transcript written on latex6.log.


I used current TeXLive2011 pretest:

voss@shania:~/Documents> lualatex -v
This is LuaTeX, Version beta-0.70.1-2011061410 (rev 4277)


-
add comment