1

I am new to XeLaTeX, I want to typeset in ArnoPro font, when I am using the fontsize 10pt xeLaTeX automaticaly load the Font ArnoPro-smText instead of ArnoPro-Regular.

The same problem is coming for bold and italic fonts, when I am using the fontsize 11, then ArnoPro-Regular font is loading, but I need to typeset in 10pt. How to laod the ArnoPro-Regular, ArnoPro-Bold font in Xelatex?

\documentclass{book}
\usepackage{fontspec}
\setmainfont[ItalicFont={Arno Pro Italic},
             BoldFont={Arno Pro Bold},
             BoldItalicFont={Arno Pro Bold Italic}
             ]{Arno Pro}
\begin{document}
Sample text \textit{itshape} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
\end{document}
  • Without knowing the font, it seems that Arno Pro comes in various optical sizes, so it chooses a more appropriate font when you use a small type size. – Sverre Sep 12 '15 at 8:57
  • It seems to be the norm for 8.6–11pt font size, according to this question. I've test and indeed with option 12pt, it is Arno Pro Regular that is loaded. – Bernard Sep 12 '15 at 9:08
  • I also tried that same but I need the 10 pt with Arno Pro Regula – vctu Sep 12 '15 at 9:45
  • I don’t have Arno Pro for testing, but setting the OpticalSize option to 0, as shown in example 16 on page 21 of the manual for fontspec, should do what you want. – Thérèse Dec 23 '15 at 16:28
3

In 2018 4Q, i.e., three years after the Q, you're likely no longer new to xelatex, and you may have long since come to a suitable resolution. Others facing this same (type of) question may benefit from these details.

Since the focus in the question and for a reliable solution, per the concept taught early and often by Ulrike Fischer, e.g., in this font question, among others, is in the fontname, it's worth the time to address this in the xelatex-specific context, per the Q.

The code that follows demonstrates both font size and font name/style, so as to confirm that the generic font name identified in the MWE's \setmainfont is, in fact, the specific font used by xelatex for all three standard book class font sizes (10pt, 11pt (10.95pt), and 12pt). Given the number of possible Arno-Pro font faces, there's a substantial need to eliminate the other possibilities. (Of course, the surest method is to have installed only the font face of choice. Thus, the implied context of the Q, here, is that of proper selection from among those multiple choices.)

The MWE defines {Arno Pro}, expecting that ArnoPro-Regular.otf is what the system will use, yet the OP's system was using ArnoPro-SmText.otf, instead. On this system (MacTeX, TexLive 2016), xelatex sees {Arno Pro} in the \setmainfont command and uses ArnoPro-Regular.otf for all three standard book class normal font sizes. To see this specifically, scroll to the end of the xelatex-produced .pdf of the code below to see that the "Sample text" output, based on {Arno Pro}, is identical to the \ArnoProThrZro output. ArnoProThrZro is constructed on the ArnoPro-Regular.otf fontfamily. The "Sample text" does not match the ArnoProThrOne output, which is constructed on the ArnoPro-SmText.otf fonts. See sample output segment following code.

Would that it were so simple. Font selection, even with xelatex, takes some care in the details, including appreciation of how xelatex goes about making that decision. A concept to share about how this system is (now) set up, the OSFONTDIR path setting is commented out in this system's .bash_profile file (in some systems, it's the .profile file, which seems to depend on which shell one has or is accustomed to using). While xelatex is designed to access the system's font files (and "system font" font files as well, of course) via use of the OSFONTDIR path(s) and use them by the simplicity of the font name, xelatex is also (still) insistent on the "one and only one font definition" concept. Thus, where xelatex reviews all the OSFONTDIR path(s) and finds a font definition and a font suitcase or, e.g., both a .ttf definition and a .otf definition, xelatex can have troubles identifying the font(s) by a generic name. To eliminate that possibility completely (who has the time to chase these font issues constantly?), OSFONTDIR is not used, at all, and the fonts are installed manually into the texlive tree structure, .ttf files into their set of directories (folders), e.g., /fonts/truetype/<various font files>, and .otf files into their set of directories (folders), e.g., /fonts/opentype/<various font files>. It can take several minutes to set up those directories in the texlive tree, which minutes save hours and hours (and hours, etc.) on the back end. [When adding a new font to the texlive tree structure, remember to (A) (sudo) -H mktexlsr [(sudo) -H texhash] and (B) (sudo) fc-cache -fv.] Also, in the .tex file, use of the actual font filename with its extension is (now) the coding practice "here" where xelatex is the intended compiling engine.

Shouldn't have to do that for xelatex. One "convenience" and advancement of xelatex is the use of installed fonts "as is." And, as this very example shows, that level of font specification isn't necessary on this system. "Here," xelatex knows exactly which font is meant by {Arno Pro}. However, that is due to the "one definition" of the font by there being only one definition (in part because the only place xelatex is looking is in the tree structure, which very greatly increases the likelihood of there being just "one definition").

Bottom line, the following shows that where the desired font(s) is(are) installed in such a way as to be found uniquely by xelatex, the MWE should work just fine to accomplish the stated purpose of using ArnoPro-Regular instead of ArnoPro-SmText.

\documentclass{book}
\usepackage{fontspec}
\usepackage{parskip}
\usepackage{setspace}
%https://www.wfonts.com/font/arno-pro
\setmainfont[ItalicFont={Arno Pro Italic},
             BoldFont={Arno Pro Bold},
             BoldItalicFont={Arno Pro Bold Italic}
             ]{Arno Pro}

%borrowing from here: https://tex.stackexchange.com/a/24600/170846
\makeatletter
\newcommand\thefontsize[1]{{#1 The current font size is: \f@size pt\par}}
\makeatother

%borrowing from here: https://tex.stackexchange.com/a/87908/170846
\newenvironment{localsize}[1]
{%
%  \clearpage
    \par
    \let\orignewcommand\newcommand
    \let\newcommand\renewcommand
    \makeatletter
    \input{bk#1.clo}%  possible values for book.cls: 10, 11, 12
    \makeatother
    \let\newcommand\orignewcommand
}
{%
  %\clearpage
  \par
}


% borrowing from here: https://tex.stackexchange.com/a/255384/170846
% and from here: https://tex.stackexchange.com/a/37251/170846
\newfontfamily\ArnoProZroOne{ArnoPro-Regular.otf}
\newfontfamily\ArnoProZroTwo{ArnoPro-SmText.otf}
\newfontfamily\ArnoProZroThr{ArnoPro-Italic.otf}
\newfontfamily\ArnoProZroFor{ArnoPro-ItalicSmText.otf}
\newfontfamily\ArnoProZroFiv{ArnoPro-Bold.otf}
\newfontfamily\ArnoProZroSix{ArnoPro-BoldItalic.otf}
\newfontfamily\ArnoProZroSvn{ArnoPro-Smbd.otf}
\newfontfamily\ArnoProZroAte{ArnoPro-SmbdSmText.otf}
\newfontfamily\ArnoProZroNin{ArnoPro-SmbdItalicSmText.otf}
\newfontfamily\ArnoProOneZro{ArnoPro-Caption.otf}
\newfontfamily\ArnoProOneOne{ArnoPro-ItalicCaption.otf}
\newfontfamily\ArnoProOneTwo{ArnoPro-BoldCaption.otf}
\newfontfamily\ArnoProOneThr{ArnoPro-SmbdItalicCaption.otf}
\newfontfamily\ArnoProOneFor{ArnoPro-Subhead.otf}
\newfontfamily\ArnoProOneFiv{ArnoPro-ItalicSubhead.otf}
\newfontfamily\ArnoProOneSix{ArnoPro-BoldSubhead.otf}
\newfontfamily\ArnoProOneSvn{ArnoPro-BoldItalicSubhead.otf}
\newfontfamily\ArnoProOneAte{ArnoPro-SmbdSubhead.otf}
\newfontfamily\ArnoProOneNin{ArnoPro-SmbdItalicSubhead.otf}
\newfontfamily\ArnoProTwoZro{ArnoPro-Display.otf}
\newfontfamily\ArnoProTwoOne{ArnoPro-ItalicDisplay.otf}
\newfontfamily\ArnoProTwoTwo{ArnoPro-LightDisplay.otf}
\newfontfamily\ArnoProTwoThr{ArnoPro-LightItalicDisplay.otf}

\newfontfamily\ArnoProThrZro[ItalicFont=ArnoPro-Italic.otf,
             BoldFont=ArnoPro-Bold.otf,
             BoldItalicFont=ArnoPro-BoldItalic.otf
             ]{ArnoPro-Regular.otf}

\newfontfamily\ArnoProThrOne[%
    ItalicFont={ArnoPro-ItalicSmText.otf}
    ]{ArnoPro-SmText.otf}


\begin{document}
\doublespacing

% see https://tex.stackexchange.com/a/14376/170846
\thefontsize\normalsize

%borrowing from here: https://tex.stackexchange.com/a/307369/170846
\expandafter\string\the\font

\begin{localsize}{10}

\parindent 0in

\thefontsize\normalsize

Sample text at 10pt

\expandafter\string\the\font

\textit{itshape \expandafter\string\the\font} 

\textsc{Small caps \expandafter\string\the\font} 

\textsc{\textit{Small caps Italic \expandafter\string\the\font}} 

\textbf{Bold \expandafter\string\the\font} 

\textbf{\textit{Bold Italic \expandafter\string\the\font}}

\end{localsize}

\begin{localsize}{11}

\parindent 0in

\thefontsize\normalsize

Sample text at 11pt

\expandafter\string\the\font

\textit{itshape \expandafter\string\the\font} 

\textsc{Small caps \expandafter\string\the\font} 

\textsc{\textit{Small caps Italic \expandafter\string\the\font}} 

\textbf{Bold \expandafter\string\the\font} 

\textbf{\textit{Bold Italic \expandafter\string\the\font}}

\end{localsize}

\begin{localsize}{12}

\parindent 0in

\thefontsize\normalsize

Sample text at 12pt

\expandafter\string\the\font

\textit{itshape \expandafter\string\the\font} 

\textsc{Small caps \expandafter\string\the\font} 

\textsc{\textit{Small caps Italic \expandafter\string\the\font}} 

\textbf{Bold \expandafter\string\the\font} 

\textbf{\textit{Bold Italic \expandafter\string\the\font}}

\end{localsize}

\singlespacing

\begin{localsize}{10}
\parindent 0in

Font set at 10pt

\ArnoProZroOne{ArnoPro-Regular.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroTwo{ArnoPro-SmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroThr{ArnoPro-Italic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFor{ArnoPro-ItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFiv{ArnoPro-Bold.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSix{ArnoPro-BoldItalic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSvn{ArnoPro-Smbd.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroAte{ArnoPro-SmbdSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroNin{ArnoPro-SmbdItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneZro{ArnoPro-Caption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneOne{ArnoPro-ItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneTwo{ArnoPro-BoldCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneThr{ArnoPro-SmbdItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFor{ArnoPro-Subhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFiv{ArnoPro-ItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSix{ArnoPro-BoldSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSvn{ArnoPro-BoldItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneAte{ArnoPro-SmbdSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneNin{ArnoPro-SmbdItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoZro{ArnoPro-Display.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoOne{ ArnoPro-ItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoTwo{ArnoPro-LightDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoThr{ArnoPro-LightItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\end{localsize}
\par 

\begin{localsize}{11}
\parindent 0in

Font set at 11pt

\ArnoProZroOne{ArnoPro-Regular.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroTwo{ArnoPro-SmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroThr{ArnoPro-Italic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFor{ArnoPro-ItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFiv{ArnoPro-Bold.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSix{ArnoPro-BoldItalic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSvn{ArnoPro-Smbd.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroAte{ArnoPro-SmbdSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroNin{ArnoPro-SmbdItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneZro{ArnoPro-Caption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneOne{ArnoPro-ItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneTwo{ArnoPro-BoldCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneThr{ArnoPro-SmbdItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFor{ArnoPro-Subhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFiv{ArnoPro-ItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSix{ArnoPro-BoldSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSvn{ArnoPro-BoldItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneAte{ArnoPro-SmbdSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneNin{ArnoPro-SmbdItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoZro{ArnoPro-Display.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoOne{ ArnoPro-ItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoTwo{ArnoPro-LightDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoThr{ArnoPro-LightItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\end{localsize}
\par

\begin{localsize}{12}
\parindent 0in

Font set at 12pt

\ArnoProZroOne{ArnoPro-Regular.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroTwo{ArnoPro-SmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroThr{ArnoPro-Italic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFor{ArnoPro-ItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroFiv{ArnoPro-Bold.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSix{ArnoPro-BoldItalic.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroSvn{ArnoPro-Smbd.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroAte{ArnoPro-SmbdSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProZroNin{ArnoPro-SmbdItalicSmText.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneZro{ArnoPro-Caption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneOne{ArnoPro-ItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneTwo{ArnoPro-BoldCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneThr{ArnoPro-SmbdItalicCaption.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFor{ArnoPro-Subhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneFiv{ArnoPro-ItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSix{ArnoPro-BoldSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneSvn{ArnoPro-BoldItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneAte{ArnoPro-SmbdSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProOneNin{ArnoPro-SmbdItalicSubhead.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoZro{ArnoPro-Display.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoOne{ ArnoPro-ItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoTwo{ArnoPro-LightDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\ArnoProTwoThr{ArnoPro-LightItalicDisplay.otf:\\ The quick brown fox jumps over the lazy dog.}

\end{localsize}

\bigskip

\begin{localsize}{10}
\parindent 0in

Sample text in 10pt  \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}

\ArnoProThrZro{Sample text ThrZro \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\ArnoProThrOne{Sample text ThrOne \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\end{localsize}

\begin{localsize}{11}
\parindent 0in

Sample text in 11pt  \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}

\ArnoProThrZro{Sample text ThrZro \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\ArnoProThrOne{Sample text ThrOne \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\end{localsize}

\begin{localsize}{12}
\parindent 0in

Sample text in 12pt  \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}

\ArnoProThrZro{Sample text ThrZro \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\ArnoProThrOne{Sample text ThrOne \textit{Italics} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | \textbf{Bold} | \textbf{\textit{Bold Italic}}
}

\end{localsize}

\end{document}

Confirmation for all three font sizes

2

Define the UprightFont:

\documentclass{book}
\usepackage{fontspec}

\setmainfont{ArnoPro}[
  UprightFont   = *-Regular,
  ItalicFont    = *-Italic,
  BoldFont      = *-Bold,
  BoldItalicFont= *-BoldItalic
]
\begin{document}
    Sample text \textit{itshape} | \textsc{Small caps} | \textsc{\textit{Small caps Italic}} | 
    \textbf{Bold} | \textbf{\textit{Bold Italic}}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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