# fontspec, lua, microtype: Renderer=Basic no longer working for specific font styles

You may have noticed that, as of now,* letterspacing small capitals is not as easy as it was in pdfTeX, where we could simply combine \textsc with microtype's \textls. Consider this example, which should give you non-letterspaced small caps; letterspaced u&lc; and letterspaced u&lc again:

(ex. 1)

\documentclass{article}
\usepackage{fontspec,microtype}

\listfiles
\setmainfont[
%Renderer=Basic
]{Minion Pro}

\begin{document}
\textsc{Lorem Ipsum}\par
\textls{Lorem Ipsum}\par
\textls{\textsc{Lorem Ipsum}}\par
\end{document}


The workaround (!) for this problem is to set Renderer=Basic.** If you uncomment the respective line in my example, you'll find the small caps properly letterspaced. However, globally putting the Renderer to Basic mode may cause problems in other places, as it seems to disable some OpenType features (the whole Renderer thing doesn't seem to be documented that well in the fontspec doc, but I can elaborate on that if you're interested). In earlier versions of fontspec, what I did was this:

(ex. 2)

\documentclass{article}
\usepackage{fontspec,microtype}
\setmainfont[SmallCapsFeatures={Renderer=Basic}]{Minion Pro}
\begin{document}
\textsc{Lorem Ipsum}\par
\textls{Lorem Ipsum}\par
\textls{\textsc{Lorem Ipsum}}\par
\end{document}


...which would put the Renderer to Basic mode for small capitals only, leaving it on Full everywhere else -- a workaround I was pretty happy with. Unfortunately, this became impossible in more recent versions of fontspec. We can still use the Renderer key (as in example 1), but not as an option for a specific font style:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! LaTeX error: "keys/key-unknown"
! The key 'fontspec/Renderer' is unknown and is being ignored.
! See the LaTeX3 documentation for further information.
! For immediate help type H <return>.
!...............................................


What I'd like to know, basically, is if there's an alternative way of selecting Basic mode for small caps only, or what other ways you guys would suggest to make small caps and microtype's letterspacing work together again -- other than redefining the small caps commands to include Renderer=Basic, which doesn't seem all-too elegant to me:

\textls{\textsc{\addfontfeatures{Renderer=Basic}Lorem Ipsum}}


* This is LuaTeX, Version beta-0.70.1-2011082320 (rev 4277)
fontspec.sty 2011/09/13 v2.2 Advanced font selection for XeLaTeX/LuaLaTeX
luaotfload.sty 2011/04/21 v1.25 OpenType layout system
microtype.sty 2011/08/18 v2.5 Micro-typographical refinements (RS)
** thanks to Hans and Ulrike for mentioning it, http://archive.contextgarden.net/message/20110615.105120.bf868745.en.html

• I would simply write the author of fontspec and ask if this change is intended. The announcement text of the new version said explicitly "This is a relatively large update for fontspec featuring quite a number of internal changes -- please report any troubles you find and I'll address them as swiftly as I can. – Ulrike Fischer Sep 21 '11 at 8:56
• Looking through the code, this problem will be related to a change in how keys are processed by fontspec. As @UlrikeFischer says, that is a bug in fontspec, so the best approach is to let Will Robertson know. – Joseph Wright Sep 21 '11 at 9:13
• @NilsL: Any progress? – Martin Schröder Dec 19 '11 at 22:45
• \textls{\textsc{\addfontfeatures{Renderer=Basic}Lorem Ipsum}} essentially works, but only when it stands alone in a paragraph. E.g. I tried that solution letterspace the first few words at the beginning of a chapter, but obviously they are followed by "normal" text and then letterspacing is broken. Does anyone knows a solution for that? – Jörg Mar 29 '12 at 13:44

Rnderer=Basic can be limited in its influence to the specific place where you want to use \textls --a title, for instance-- by inserting the rendering with \addfontfeatures` and adding grouping brackets around the those two commands and the target text.