Selecting optical sizes for all fonts in a family
You have to specify the font for each feature. See section 5.1.2. of the fontspec manual.
A XeTeX MWE:
\documentclass[12pt]{memoir}
\usepackage{fontspec}
\setmainfont[%
UprightFeatures={
SizeFeatures={
{Size={-8.4},Font=MinionPro-Capt},
{Size={8.4-13},Font=MinionPro-Regular},
{Size={13-19.9},Font=MinionPro-Subh},
{Size={19.9-},Font=MinionPro-Disp}
},
},
BoldFeatures={
SizeFeatures={
{Size={-8.4},Font=MinionPro-BoldCapt},
{Size={8.4-13},Font=MinionPro-Bold},
{Size={13-19.9},Font=MinionPro-BoldSubh},
{Size={19.9-},Font=MinionPro-BoldDisp}
},
},
ItalicFeatures={
SizeFeatures={
{Size={-8.4},Font=MinionPro-ItCapt},
{Size={8.4-13},Font=MinionPro-It},
{Size={13-19.9},Font=MinionPro-ItSubh},
{Size={19.9-},Font=MinionPro-ItDisp}
},
},
BoldItalicFeatures={
SizeFeatures={
{Size={-8.4},Font=MinionPro-BoldItCapt},
{Size={8.4-13},Font=MinionPro-BoldIt},
{Size={13-19.9},Font=MinionPro-BoldItSubh},
{Size={19.9-},Font=MinionPro-BoldItDisp}
},
},
]
{Minion Pro}
\begin{document}
\noindent
Regular\\
\textit{Italic}\\
\textbf{Bold}\\
\textit{\textbf{Bold Italic}}\\
\noindent
{\tiny tiny}\\
{\normalsize normal, not \textbf{\textit{HUGE bold italic}}}\\
{\Large Large}\\
{\LARGE LARGE}\\
{\HUGE HUGE}\\
\noindent
{\tiny{
\textit{tiny italic} \textbf{tiny bold} \textbf{\textit{tiny bold italic}}}}\\
{\Large{
\textit{Large italic} \textbf{Large bold} \textbf{\textit{Large bold italic}}}}\\
{\HUGE{
\noindent
HUGE\\
\textit{HUGE italic}\\
\textbf{HUGE bold}\\
\textbf{\textit{HUGE bold italic}}}}
\end{document}
With XeTeX you do not need multiple size declarations, and I believe you should not with LuaTeX. In what follows, I'll refer to @Ludenticus' solution as (1), and mine, which follows, as (2):
\documentclass[12pt,a5paper]{memoir}
\setlrmarginsandblock{1cm}{*}{1}
\usepackage{fontspec}
\setmainfont{Minion Pro}[%
SizeFeatures={%
{Size={-8.4},Font=* Caption},
{Size={8.4-13},Font=*},
{Size={13-19.9},Font=* Subhead},
{Size={19.9-},Font=* Display}
},
BoldFont={* Bold},
BoldItalicFont={* Bold Italic},
]
\setlength{\parindent}{0pt}
\nonzeroparskip
\begin{document}
\noindent
Regular
\textit{Italic}
\textbf{Bold}
\textit{\textbf{Bold Italic}}\par
\noindent
{\tiny tiny}\par
{\normalsize normal, not \textbf{\textit{HUGE bold italic}}}\par
{\Large Large}\par
{\LARGE LARGE}\par
{\HUGE HUGE}\par
\noindent
{\tiny{
\textit{tiny italic} \textbf{tiny bold} \textbf{\textit{tiny bold italic}}}}\par
{\Large{
\textit{Large italic} \textbf{Large bold} \textbf{\textit{Large bold italic}}}}\par
{\HUGE{
\noindent
HUGE\par
\textit{HUGE italic}\par
\textbf{HUGE bold}\par
\textbf{\textit{HUGE bold italic}}}}
\end{document}
(1) and (2) processed with XeLaTeX produce visually identical PDFs (compared with diffpdf
, option 'appearance'.
(1) and (2) processed with LuaLaTeX are different. The PDF from (1) has a full complement of embedded fonts (16), while (2) only has 10, the extra optical sizes being missing.
Notes:
- The default Bold association for Minion Pro is not 'bold', but 'semibold'. I assume this was what made you search for the parameters to change the two bold series.
- If you're happy with semibold, you can just omit the two Bold... lines altogether.
- I much prefer to use font names rather than font filenames -- it seems a lot less brittle (once you discover the right names!).