5

How to have bold small caps with Erewhon ?

enter image description here

\documentclass{article}

    \RequirePackage{fontspec}
    \setmainfont{Erewhon}[
        Extension=.otf,
        UprightFont=*-Regular,
        ItalicFont=*-Italic,
        BoldFont=*-Bold,
        BoldItalicFont=*-BoldItalic,
        SlantedFont=*-RegularSlanted,
        BoldSlantedFont=*-BoldSlanted,
        SmallCapsFont=*-SmallCaps,
        SmallCapsFont=*-Regular,
        SmallCapsFeatures={Letters=SmallCaps}
        ]
    \setsansfont{texgyreheros}[
        Scale=MatchLowercase,% or MatchUppercase
        Extension=.otf,
        UprightFont=*-regular,
        ItalicFont=*-italic,
        BoldFont=*-bold,
        BoldItalicFont=*-bolditalic,
        ]


\begin{document}

\textbf{Exercice}

\textbf{\textsc{Exercice}}

\textsc{\textbf{Exercice}}

\textsc{Exercice}

\end{document}
3
  • See 5.1.2 Small caps and slanted font shapes in the fontspec documentation. Aug 11, 2015 at 9:55
  • I read after your advice, but still not understand what to do, maybe a lack in english... Any help would be appreciate.
    – Tarass
    Aug 11, 2015 at 10:05
  • \usepackage{erewhon} and no optinal arguments in \setmainfont solves the problem. Aparently ?
    – Tarass
    Aug 11, 2015 at 11:49

1 Answer 1

4

You have two errors. First, Erewhon-SmallCaps.otf doesn't exist; second, you're declaring that small caps must use Erewhon-Regular.otf.

In the log file you find

.................................................
. fontspec info: "defining-font"
. 
. Font family 'Erewhon(0)' created for font 'Erewhon' with options
. [Ligatures=TeX,Extension=.otf,UprightFont=*-Regular,ItalicFont=*-Italic,BoldF
ont=*-Bold,BoldItalicFont=*-BoldItalic,SlantedFont=*-RegularSlanted,BoldSlanted
Font=*-BoldSlanted,SmallCapsFont=*-SmallCaps,SmallCapsFont=*-Regular,SmallCapsF
eatures={Letters=SmallCaps}].
. 
. This font family consists of the following NFSS series/shapes:
. - 'normal' (m/n) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'small caps'  (m/sc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'bold' (bx/n) with NFSS spec.:
. <->"[Erewhon-Bold.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'bold small caps'  (bx/sc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'italic' (m/it) with NFSS spec.:
. <->"[Erewhon-Italic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'italic small caps'  (m/itsc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'slanted' (m/sl) with NFSS spec.:
. <->"[Erewhon-RegularSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-tex
t;"
. - 'slanted small caps'  (m/slsc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'bold italic' (bx/it) with NFSS spec.:
. <->"[Erewhon-BoldItalic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'bold italic small caps'  (bx/itsc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'bold slanted' (bx/sl) with NFSS spec.:
. <->"[Erewhon-BoldSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"

. - 'bold slanted small caps'  (bx/slsc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"
.................................................

and you clearly see that small caps are always mapped to Erewhon-Regular.otf.

By removing the SmallCaps... lines, we get

.................................................
. fontspec info: "defining-font"
. 
. Font family 'Erewhon(0)' created for font 'Erewhon' with options
. [Ligatures=TeX,Extension=.otf,UprightFont=*-Regular,ItalicFont=*-Italic,BoldF
ont=*-Bold,BoldItalicFont=*-BoldItalic,SlantedFont=*-RegularSlanted,BoldSlanted
Font=*-BoldSlanted].
. 
. This font family consists of the following NFSS series/shapes:
. - 'normal' (m/n) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'small caps'  (m/sc) with NFSS spec.:
. <->"[Erewhon-Regular.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp
;"-
. 'bold' (bx/n) with NFSS spec.:
. <->"[Erewhon-Bold.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'bold small caps'  (bx/sc) with NFSS spec.:
. <->"[Erewhon-Bold.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp;"-

. 'italic' (m/it) with NFSS spec.:
. <->"[Erewhon-Italic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'italic small caps'  (m/itsc) with NFSS spec.:
. <->"[Erewhon-Italic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+smcp;
"-
. 'slanted' (m/sl) with NFSS spec.:
. <->"[Erewhon-RegularSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-tex
t;"
. - 'slanted small caps'  (m/slsc) with NFSS spec.:
. <->"[Erewhon-RegularSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-tex
t;+smcp;"-
. 'bold italic' (bx/it) with NFSS spec.:
. <->"[Erewhon-BoldItalic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"
. - 'bold italic small caps'  (bx/itsc) with NFSS spec.:
. <->"[Erewhon-BoldItalic.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+s
mcp;"-
. 'bold slanted' (bx/sl) with NFSS spec.:
. <->"[Erewhon-BoldSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-text;"

. - 'bold slanted small caps'  (bx/slsc) with NFSS spec.:
. <->"[Erewhon-BoldSlanted.otf]/OT:script=latn;language=DFLT;mapping=tex-text;+
smcp;"
.................................................

and everything is normal:

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Erewhon}[
  Extension=.otf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
  SlantedFont=*-RegularSlanted,
  BoldSlantedFont=*-BoldSlanted,
]

\begin{document}

\textbf{Exercice}

\textbf{\textsc{Exercice}}

\textsc{\textbf{Exercice}}

\textsc{Exercice}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .