# XeLaTeX can't turn off small caps

I found a weird issue when using the free typeface Fontin.

\documentclass{article} % Default font size and paper size

\setmainfont{Fontin}

\begin{document}

Here is some text.

\textnormal{Here is some text.}

\textup{Here is some text.}

\textrm{Here is some text.}

\textsf{Here is some text.}

\textsl{Here is some text.}

\textsc{Here is some text.}

\uppercase{Here is some text.}

\lowercase{Here is some text.}

\textbf{Here is some text.}

\textmd{Here is some text.}

\end{document}


When I compile with XeLaTeX, most of the text comes out as small-caps:

If I use LuaLaTeX, however, everything is rendered as expected -- except for the small-caps line:

I have only encountered this issue with Fontin; other typefaces seem to work as they should. I'm using Arch Linux.

• I just downloaded the font now and tried texlive 2015 xelatex and got this output – David Carlisle Jan 10 '16 at 20:01
• This font has been problematic for years, but my problems don’t look exactly like yours. Try this very explicit invocation: \setmainfont{Fontin}[BoldFont={* Bold},ItalicFont={* Italic},SmallCapsFont={* SmallCaps}] and \setsansfont{Fontin Sans}. – Thérèse Jan 10 '16 at 20:45
• You can even add UprightFont={* Regular} to the list of options. – Thérèse Jan 11 '16 at 1:26
• I get the output in the question. The warning in both cases is that small-caps isn't defined and upright is substituted.... – cfr Jan 11 '16 at 3:23
• If I use \setmainfont{Fontin}[SmallCapsFont={* SmallCaps}], the result is what's expected. – egreg Feb 12 '16 at 13:54

\documentclass{article} % Default font size and paper size
\setmainfont[SmallCapsFont=Fontin]{Fontin-Regular}

\begin{document}
Here is some text.\par
\textnormal{Here is some text.} normal\par
\textup{Here is some text.} up\par
\textrm{Here is some text.} rm\par
\textsf{Here is some text.} sf\par
\textsl{Here is some text.} sl\par
\textsc{Here is some text.} sc\par
\uppercase{Here is some text.} uppercase\par
\lowercase{Here is some text.} lowercase\par
\textbf{Here is some text.} bf\par
\textmd{Here is some text.} md
\end{document}


• On MacTeX2015, it looks like it's necessary to write \setmainfont[SmallCapsFont={Fontin SmallCaps}]{Fontin} in order to get everything -- incl. smallcaps, slanted, and bold -- running properly under LuaLaTeX. – Mico Mar 13 '16 at 11:13
• Yes, that depends to the system and the installed fonts. However, I suppose, that you already hadn't the problem with SmallCaps everywhere – user2478 Mar 13 '16 at 11:15
• Indeed, I have version 001.000 of the Fontin package, year 2004. – Mico Mar 13 '16 at 11:19
• The problem is the family name of the small caps font: Family: Fontin SmallCaps. It should be Fontin. – user2478 Mar 13 '16 at 11:36
\documentclass{article}
\usepackage{fontspec}
\renewcommand{\familydefault}{\sfdefault}
\setmainfont{Fontin}

\begin{document}
Here is some text.

\textnormal{Here is some text.}

\textup{Here is some text.}

\textrm{Here is some text.}

\textsf{Here is some text.}

\textsl{Here is some text.}

\textsc{Here is some text.}

\uppercase{Here is some text.}

\lowercase{Here is some text.}

\textbf{Here is some text.}

\textmd{Here is some text.}

\end{document}

\end{document}


Produces