Combining sffamily and scshape

According to a relevant comment, one should be able to specify both weights and shapes for each family. Why can I (seemingly) not have small caps with \sffamily?

Minimal example:

\documentclass{article}

\begin{document}
\sffamily\scshape Test
\end{document}


produces the following output:

• Neither Computer Modern Sans nor Latin Modern Sans have a small caps font. – egreg Jun 11 '13 at 13:47
• A font with the specifics must exist. If not LaTeX will fall back to a substitute. You can get sans serif small caps e.g with libertine. – Ulrike Fischer Jun 11 '13 at 13:48
• [meta:] how is the big second example relevant to your question? I think the first one illustrates your problem just fine, maybe in combination with an image. (been thinking about editing it out, but I thought I'd bring it up first) – Nils L Jun 11 '13 at 13:56
• This works with certain font families, e.g. palatino – Andrew Swann Jun 11 '13 at 20:32
• @egreg Please make an answer here :-) – Joseph Wright Aug 12 '13 at 13:47

Imitation of small caps by reducing the uppercase letters can, in some rare cases, give a result slightly above the atrocious level. With Computer Modern Sans Serif such an attempt is doomed to horrible failure, because the heavy strokes are a distinctive feature of the font and you'd be mixing very different strokes between capitals and small capitals. I suggest using spaced all capitals (you get them easily with microtype).

This is an example with Computer Modern, European Modern and Latin Modern.

\documentclass{article}
\usepackage[T1,OT1]{fontenc}
\newcommand{\hsc}[1]{{\footnotesize\MakeUppercase{#1}}}
\begin{document}
\sffamily
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}

\fontencoding{T1}
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}

\fontfamily{lmss}
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}
\end{document}


Apart from the missing kerns, the contrast between the F and the A is too visible and horrible.

• Horrible indeed; is there a way to convince microtype to take care of this? – Sean Allred Aug 12 '13 at 14:40
• @SeanAllred Sorry, if the font doesn't support small caps, there's not much to do. – egreg Aug 12 '13 at 17:38
• Fair enough :-) – Sean Allred Aug 12 '13 at 17:41

There is a version of computer modern with small caps in the sansmathfonts package. You can use it follows:

\documentclass{article}
\usepackage[notmath]{sansmathfonts}
\begin{document}
\sffamily
\textsc{Is This Better Than Fake Small Caps?}
\end{document}

• Fine. but works only with pdfTeX, not with LuaTeX nor XeTeX. – Covich Dec 27 '18 at 14:10

With LuaTeX or XeTeX and fontspec this works out of the box (maybe the font has to support it, but at least with Libertinus):

\documentclass[convert,varwidth]{standalone}
\usepackage{fontspec}

\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}

\begin{document}
Normal Text \\
{\sffamily sffamily Text} \\
{\scshape scshape Text} \\
{\sffamily\scshape sffamily scshape Text} \\
\end{document}


This yields