Setting SMALL CAPS font protrusion in microtype for Charis SIL?
The EU1 encoding is the standard encoding used by fontspec
with XeTeX. As of 2016 there is an experimental TU encoding which will be used, but at time of writing, this encoding is enabled only by a package option [tuenc]
, although should become the default. The microtype
package already supports this encoding too. So, you should not need to do anything special:
\documentclass{article}
\usepackage{fontspec}
\usepackage[protrusion=true]{microtype}
\setmainfont{Charis SIL}
\makeatletter
\newcommand*{\showenc}{The encoding is \f@encoding.\par}
\makeatother
\begin{document}
\showenc
\end{document}
There are some protrusion settings in the mt-CharisSIL.cfg
file for small caps, and your document produces no warnings or errors using microtype 2016/05/14 v2.6a
(when I remove the [StylisticSet=1]
from the \setmainfont
command.)
The small caps protrusion settings for Charis SIL are specified by referring to the glyph names, which is usually the most stable way. At some point, however, the developers of Charis SIL have renamed all small caps glyphs from, say, a.SC
to a.sc
:
(left: version 4.106, right: version 5.000)
EDIT: As of version 2.7, microtype
will automatically choose the right names both with luatex
and xetex
, so it is no longer necessary to fix the settings manually (in mt-CharisSIL.cfg
).