[Tex/LaTex] Use of \scshape or \textsc with fontspec/xelatex

fontsfontspecsmall-capsxetex

I've already tried Use of \scshape or \textsc in beamer \institute fix with \rmfamily in the MWE below, but it doesn't work – I've seen A problem with \textsc as well, but I don't think I should load fontenc now that I'm using fontspec with xelatex.

This is the output I get – the centered text below the section should be smallcaps, but isn't (note, however, that the section heading/title does indeed show smallcaps, as intended):

test.png

Here is the MWE:

\documentclass[letterpaper,12pt]{article}

% \typeout{ == \the\paperwidth / \the\paperheight ==}
% \typeout{ == \the\pdfpagewidth / \the\pdfpageheight ==}
\pdfpagewidth=\paperwidth \pdfpageheight=\paperheight

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Junicode}

\makeatletter
\renewcommand{\section}{\@startsection
{section}%                   % the name
{1}%                         % the level
{\z@}%                       % the indent / 0mm
{-\baselineskip}%            % the before skip / -3.5ex \@plus -1ex \@minus -.2ex
{0.5\baselineskip}%          % the after skip / 2.3ex \@plus .2ex
{\centering\normalsize\scshape}} % the style
\makeatother


\usepackage{lipsum}
\usepackage{tikz}


\begin{document}

\section*{A test of section small-caps}

\begin{center}
\textbf{\rmfamily \textsc{Something written without small-caps}}
\end{center}

  \lipsum[1]

\end{document}

Any suggestions on how to get the small-caps running here?

Many thanks in advance for any answers,
Cheers!

Best Answer

The problem is that your font does not define a bold small-caps. If you use a font with a bold small-caps such as Minion Pro, it will work:

Demo with Minion Pro