[Tex/LaTex] Problem with small caps in XeLaTeX

fontsfontspecsmall-capsUbuntuxetex

I'm not able to make small caps work with any font in XeLaTeX. Here is output illustrating the issue for Charis SIL, Garuda, and Times New Roman, respectively. Pasted below are a MWE and version and package information.

enter image description here

Minimal working example:

\listfiles
\documentclass{article}
\usepackage{fontspec,xunicode,xltxtra}
\def\sample{The quick brown fox jumped.}
\begin{document}\Large
\fontspec{Charis SIL}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par\medskip
\hfil\rule{6cm}{5mm}\hfil\par
\fontspec{Garuda}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par\medskip
\hfil\rule{6cm}{5mm}\hfil\par
\fontspec{Times New Roman}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par
\end{document}

\listfiles output:

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
   expl3.sty    2013/07/28 v4582 L3 Experimental code bundle wrapper
 l3names.sty    2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty    2013/07/28 v4581 L3 Experimental bootstrap code
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2013/07/28 v4581 L3 Basic definitions
 l3expan.sty    2013/07/24 v4565 L3 Argument expansion
    l3tl.sty    2013/07/28 v4581 L3 Token lists
   l3seq.sty    2013/07/28 v4581 L3 Sequences and stacks
   l3int.sty    2013/07/28 v4581 L3 Integers
 l3quark.sty    2013/07/21 v4564 L3 Quarks
   l3prg.sty    2013/07/28 v4581 L3 Control structures
 l3clist.sty    2013/07/28 v4581 L3 Comma separated lists
 l3token.sty    2013/07/28 v4581 L3 Experimental token manipulation
  l3prop.sty    2013/07/28 v4581 L3 Property lists
   l3msg.sty    2013/07/28 v4581 L3 Messages
  l3file.sty    2013/07/28 v4581 L3 File and I/O operations
  l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips
  l3keys.sty    2013/07/28 v4581 L3 Experimental key-value interfaces
    l3fp.sty    2013/07/09 v4521 L3 Floating points
   l3box.sty    2013/07/28 v4581 L3 Experimental boxes
l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer
 l3color.sty    2012/08/29 v4156 L3 Experimental color support
l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
l3candidates.sty    2013/07/24 v4576 L3 Experimental additions to l3kernel
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  xparse.sty    2013/07/28 v4582 L3 Experimental document command parser
fontspec-patches.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe
X
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
  eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
  eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth
er characters in Unicode lower plane
 eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
   xetex.def    2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)

fontspec.cfg
 xltxtra.sty    2010/09/20 v0.5e Improvements for the "XeLaTeX" format
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
realscripts.sty    2013/03/18 v0.3c Access OpenType subscripts and superscripts

metalogo.sty    2010/05/29 v0.12 Extended TeX logo macros
   t3cmr.fd    2001/12/31 TIPA font definitions

Finally, version info for my OS and TeX distribution:

XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 51.1; using 51.1
Compiled with zlib version 1.2.7; using 1.2.7
Compiled with FreeType2 version 2.4.11; using 2.4.11
Compiled with Graphite2 version 1.2.1; using 1.2.1
Compiled with HarfBuzz version 0.9.15; using 0.9.15
Compiled with fontconfig version 2.10.93; using 2.8.0
Compiled with libpng version 1.5.16; using 1.5.16
Compiled with poppler version 0.22.2


LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:   oneiric

Best Answer

For Charis SIL, try using Renderer=ICU. From this mailing list post

Charis SIL is a hybrid OpenType/Graphite font, in 0.9998 OpenType was chosen but in 0.9999 Graphite is chosen instead (a side effect of using HarfBuzz for both OpenType and Graphite) I’m not yet decided whether to consider this a bug or a feature.

Either way, with such hybrid fonts it is always better to be explicit about what font technology to use, adding a “Renderer=ICU” will force OpenType layout (should be renamed “Renderer=OT” now, but it still works nevertheless).

The version of Times New Roman included with Windows XP does not have any small caps, the version in included with Windows 8.1, though, do have small caps and works just fine with XeTeX (no idea about other versions of the font).

No idea about Garuda, though.