# Small caps issue with Xelatex

## Problem

I've just bought Baskerville Classico font and tried to load it using Xelatex, but small caps didn't work. I finally found this post : [https://tex.stackexchange.com/questions/165998/small-caps-in-fontspec-on-xelatex]... added this piece of code and loaded it with LuaLaTex and it works:

    \setmainfont[
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},


Is my preamble correct?

This is a MWE:

    \documentclass[hidelinks,12pt,twoside,openright,a4paper]{book}
\usepackage[french]{babel}
\usepackage{fontspec}
\setmainfont[
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\fancyhf{} % sets both header and footer to nothing
\fancyfoot{}
\fancyhead[CE]{\textsc{A title}} % even pages: chapter title
\fancyhead[CO]{\textsc\leftmark} % odd pages: book title

\begin{document}

\chapter{A title}
\lipsum

\end{document}


## Solution

Finally, I found the solution. This is the piece of code to add instead of Tex Gyre Termes:

\setmainfont[
SmallCapsFeatures={Letters=SmallCaps},

• If you do that, you won’t get Barkerville Classico’s small caps. You’re substituting a Times clone. I don’t own that font to test, but does otfinfo -f say it supports the Small Caps feature? Or does the family have small caps as a separate face? Jun 5 at 8:00
• Otfinfo : otfinfo -f Baskerville Classico otfinfo: Baskerville: No such file or directory otfinfo: Classico: No such file or directory
– domi
Jun 5 at 16:59
• Small caps work well in Word, for instance.
– domi
Jun 5 at 17:00
• otfinfo needs the file and path, which you should be able to find with luaotfload-tool --find "Baskerville Classico". Jun 5 at 20:08
• afaik, bounty prizes are nonrefundable, and expiration dates nonnegotiable. What may work is for @Davislor to provide an answer, because it seems to me that he gave the op the clue to solve his problem, and then award that bounty to that answer. Jun 12 at 19:02

By default, fontspec tries to activate the feature it calls Letters=SmallCaps and OpenType calls smcp. You can check whether a given font has this feature with the command otfinfo -f, followed by the absolute filename with its path. You can get the filename from the display name of the font with luaotfload-tool --find. You typically want to put names that contain spaces in double quotes on the command line.

In this case, you told me that the filename was /Library/Fonts/Linotype - Baskerville Classico.otf, and that it did not have this feature. There was, however, another font face in the same directory that did have small caps, Linotype - Baskerville Classico SC.otf.

Typically, you would load a separate small-caps face like this by adding options like

\defaultfontfeatures[BaskervilleClassico]{
% Set Ligatures, Numbers, etc.
SmallCapsFont={* SC},
SmallCapsFeatures={} }


  ItalicFeatures = { SmallCapsFont = {*-SC-Italic},

What methods of loading a file vary between XeTeX and LuaTeX on different OSes, but using the exact filename with Extension= is usually recommended.
Here, what seemed to work was the family name and style. You can get a list of the possible family and style names that fontspec might understand with otfinfo -i, and test whether LuaTeX can look up a name with luaotfload-tool --find or whether XeTeX can look it up with fc-match.