Search code examples
latexxelatexfontspec

When including Minion Pro Font only a few work, the rest won't


I have the whole package of the Minion Pro / Math fonts and want to use them in a self made class, but only some of them work and the majority does not.

Minion Pro contains sizes: regular, capt, disp and subhead width: regular and condensed weights: regular, medium, semibold and bold variances: regular and italic

and all combinations

I do not really get, why it does not work, because I use code shown in the fontspec documentation.

% !TeX TS-program = lualatex
\documentclass{scrbook}
\usepackage{fontspec}
\setmainfont{MinionPro}[
   Extension = {.otf},%
   % these work
   UprightFont = {*-Regular},% 
   ItalicFont = {*-It},%
   BoldFont = {*-Bold},% 
   BoldItalicFont = {*-BoldIt},%
   FontFace = {sb}{\updefault}{*-Semibold},%
   FontFace = {sb}{it}{*-SemiboldIt},%
   % these do not
   FontFace = {c}{n}{*-Cn},%
   %FontFace = {sbc}{\updefault}{*-SemiboldCn}
   %FontFace = {md}{\updefault}{*-Medium},%
   %FontFace = {md}{it}{*MediumIt},%
   SizeFeatures = {
      {Size = 6.01-8.41, Font = MinionPro-Capt.otf},
      {Size = 8.41-13.01, Font = MinionPro-Regular.otf},
      {Size = 13.01-19.91, Font = MinionPro-Subh.otf},
      {Size = 19.91-, Font = MinionPro-Disp.otf}
   }]

% here I declare some commands to use the new fonts

% Commands to use the different fonts
\DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont}
\DeclareTextFontCommand{\textsb}{\sbseries}

\DeclareRobustCommand{\sbiseries}{\fontseries{sbi}\selectfont}
\DeclareTextFontCommand{\textsbi}{\sbiseries}

\DeclareRobustCommand{\cnseries}{\fontseries{cn}\selectfont}
\DeclareTextFontCommand{\textcn}{\cnseries}

\begin{document}
\cnseries Test
\end{document}

Only the regular, italic, bold, bold-italic, semibold and semibold-italic.

Until now I focused to make the condensed font work, but the other combinations did not work eigther. As mentioned above, the FontFace = {c}{n}{*-Cn} is taken out of the fontspec documentation, so I do not get, why this does not work

Can someone tell me what I am doing wrong?


Solution

  • The error message

    Font shape `TU/MinionPro(0)/cn/n' undefined(Font) using `TU/MinionPro(0)/m/n' instead
    

    directly leads to the solution. It has to be

    FontFace = {cn}{n}{*-Cn},%