1

I am using XeLaTeX & fontspec in TexLive on OS X Yosemite.

The problem is I could not use font Seravek's small caps. However, if I define a font family "Seravek ExtraLight" directly, small caps will work.

It has been confirmed that Seravek and the version on my Mac supports small caps.

Here is a simplified code:

\documentclass{article}
\usepackage{fontspec}
\newfontfamily \seravek[BoldFont = * ExtraLight]{Seravek}
\newfontfamily \seravekEL{Seravek ExtraLight}
\newfontfamily \avenir{Avenir Next}

\begin{document}
\seravek \scshape Small Caps Testing

\seravek \scshape \textbf{Small Caps Testing}

\seravekEL \scshape Small Caps Testing

\avenir \scshape Small Caps Testing

\end{document}

The output: PDF output

As you could see, no small caps for Seravek. With the normal way to define font family, no small caps for different font weight, either.

The log info about fontspec indicated that fontspec failed to load small caps for Seravek, as pasted here:

. fontspec info: "defining-font"
. 
. Font family 'Seravek(0)' created for font 'Seravek' with options [].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Seravek/ICU:"
. 
. * 'bold' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:"
. 
. * 'italic' with NFSS spec.:
. <->"Seravek/I/ICU:"
. 
. * 'bold italic' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:"
.................................................
\g_fontspec_family_Seravek ExtraLight_int=\count124
.................................................
. fontspec info: "defining-font"
. 
. Font family 'SeravekExtraLight(0)' created for font 'Seravek ExtraLight'
. with options [].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:script=latn;language=DFLT;"
. 
. * 'small caps' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:script=latn;language=DFLT;+smcp;"
. 
. * 'bold' with NFSS spec.:
. <->"Seravek ExtraLight/B/ICU:script=latn;language=DFLT;"
. 
. * 'italic' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:script=latn;language=DFLT;"
. 
. * 'italic small caps' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:script=latn;language=DFLT;+smcp;"
. 
. * 'bold italic' with NFSS spec.:
. <->"Seravek ExtraLight/BI/ICU:script=latn;language=DFLT;"
.................................................
\g_fontspec_family_Avenir Next_int=\count125
.................................................
. fontspec info: "defining-font"
. 
. Font family 'AvenirNext(0)' created for font 'Avenir Next' with options [].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Avenir Next/ICU:script=latn;language=DFLT;"
. 
. * 'small caps' with NFSS spec.:
. <->"Avenir Next/ICU:script=latn;language=DFLT;+smcp;"
. 
. * 'bold' with NFSS spec.:
. <->"Avenir Next/B/ICU:script=latn;language=DFLT;"
. 
. * 'bold small caps' with NFSS spec.:
. <->"Avenir Next/B/ICU:script=latn;language=DFLT;+smcp;"
. 
. * 'italic' with NFSS spec.:
. <->"Avenir Next/I/ICU:script=latn;language=DFLT;"
. 
. * 'italic small caps' with NFSS spec.:
. <->"Avenir Next/I/ICU:script=latn;language=DFLT;+smcp;"
. 
. * 'bold italic' with NFSS spec.:
. <->"Avenir Next/BI/ICU:script=latn;language=DFLT;"
. 
. * 'bold italic small caps' with NFSS spec.:
. <->"Avenir Next/BI/ICU:script=latn;language=DFLT;+smcp;"
.................................................

Where is the problem? How could I solve this? Thanks!

  • 1
    Please provide a compilable MWE in order to make helping you easier and more efficient. If the font provides small caps, there is no error visible in your snippet. We need more information here. If possible, check whether you can reproduce this with a standard font. Thanks. – LaRiFaRi Sep 2 '14 at 15:00
  • Sorry for the bad format. I think the question is much easier to read now. Thanks for your advice! – Minsheng Liu Sep 2 '14 at 15:36
  • What does otfinfo -f <path to font> give you? Does it list small-caps for the standard weight? – cfr Sep 2 '14 at 22:45
  • @cfr It is a TrueType collection just like other new fonts Apple has provided. I extracted it with otc2otf and have confirmed that it has the "smcp" feature. – Minsheng Liu Sep 3 '14 at 2:38
  • 1
    Are you using a fully up-to-date (using TeX Live Manager) installation of MacTeX 2014? The log file indicates you may not be, off the top of my head. I'm not saying that fontspec is blameless here, but would be good to ensure you're checking with the latest version of the code. – Will Robertson Sep 3 '14 at 8:08
3

This does look like a possible fontspec problem, since loading the font manually does allow small caps to be selected. (I didn't realise Seravek was bundled with Mavericks.) It might take me a little while to get around to fixing this.

In the meantime you can use an ugly form of font loading:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\begin{document}
\fontspec[SmallCapsFont=Seravek,SmallCapsFeatures={RawFeature=+smcp}]{Seravek}
regular \textsc{small caps}
\end{document}

The problem must lie in the code that checks whether a font feature exists; this could partially be a XeTeX bug as well.

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.