NEWS: As of 2019-06-17, the designer has fixed the smcp
feature. It now suffices to write \setmainfont{Doves Type}[SmallCapsFeatures={Ligatures={NoCommon,NoRare}}]
, and this question becomes of interest only as an example of diagnosing font problems and repairing them on the fly with \directlua{...}
.
Let me start by showing the problem more clearly:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Doves Type}
\begin{document}
This is not Small Caps text.
\textsc{This is Small Caps text, WRONGLY affecting only caps.}
{\addfontfeatures{Letters=SmallCaps}This is Small Caps text, WRONGLY affecting only caps.}
{\addfontfeatures{Letters=UppercaseSmallCaps}This is Small Caps text, RIGHTLY affecting only caps.}
\end{document}

(Notice the use of \addfontfeatures{...}
rather than the less efficient repetition of \fontspec{...}
, a command which the manual describes as not generally recommended.)
Why the problem? Because the smcp
feature has been defined in exactly the same way as c2sc
, by mistake. That is, it replaces A
by A.sc
, whereas it should replace a
by A.sc
, and so on for the rest of the alphabet.
What to do? I rarely use xelatex
, so I’d need more time to think about solutions for it (and someone else could do it better). But with lualatex
, the solution is using \directlua{...}
to add the correct substitutions to smcp
:
\documentclass{article}
\usepackage{fontspec}
\directlua{
fonts.handlers.otf.addfeature{
name = "smcp",
type = "substitution",
data = {
a = "A.sc",
b = "B.sc",
c = "C.sc",
d = "D.sc",
e = "E.sc",
f = "F.sc",
g = "G.sc",
h = "H.sc",
i = "I.sc",
j = "J.sc",
k = "K.sc",
l = "L.sc",
m = "M.sc",
n = "N.sc",
o = "O.sc",
p = "P.sc",
q = "Q.sc",
r = "R.sc",
s = "S.sc",
t = "T.sc",
u = "U.sc",
v = "V.sc",
w = "W.sc",
x = "X.sc",
y = "Y.sc",
z = "Z.sc",
},
}
}
\setmainfont{Doves Type}
\begin{document}
This is not Small Caps text.
\textsc{This is Small Caps text, WRONGLY affecting only caps.}
{\addfontfeatures{Letters=SmallCaps}This is Small Caps text, WRONGLY affecting only caps.}
{\addfontfeatures{Letters=UppercaseSmallCaps}This is Small Caps text, RIGHTLY affecting only caps.}
\end{document}

As you can see, this isn’t a complete solution: in the first place, it gives a “c2sc
plus smcp
” result (which you may or may not want), and second, it chokes on ligatures. I’ll experiment with refining my solution and update this answer later.
An even better solution would be contacting the designer, pointing to this question, and asking whether he could repair the definition of smcp
in the next version of the font. (For accessibility, it would also be desirable to rename glyphs like the swashy Q and fix their encoding: right now, that Q is where ✓ ought to be, and it’s named accordingly.) In my experience, most designers want to know about any flaws so that they can fix them.
Update
To fix the problem with ligatures, turn them off for small caps; and to apply small caps to lowercase letters only, substitute A
for A.sc
, etc., as follows:
\documentclass{article}
\usepackage{fontspec}
\directlua{
fonts.handlers.otf.addfeature{
name = "smcp",
type = "substitution",
data = {
["A.sc"] = "A",
a = "A.sc",
["B.sc"] = "B",
b = "B.sc",
["C.sc"] = "C",
c = "C.sc",
["D.sc"] = "D",
d = "D.sc",
["E.sc"] = "E",
e = "E.sc",
["F.sc"] = "F",
f = "F.sc",
["G.sc"] = "G",
g = "G.sc",
["H.sc"] = "H",
h = "H.sc",
["I.sc"] = "I",
i = "I.sc",
["J.sc"] = "J",
j = "J.sc",
["K.sc"] = "K",
k = "K.sc",
["L.sc"] = "L",
l = "L.sc",
["M.sc"] = "M",
m = "M.sc",
["N.sc"] = "N",
n = "N.sc",
["O.sc"] = "O",
o = "O.sc",
["P.sc"] = "P",
p = "P.sc",
["Q.sc"] = "Q",
q = "Q.sc",
["R.sc"] = "R",
r = "R.sc",
["S.sc"] = "S",
s = "S.sc",
["T.sc"] = "T",
t = "T.sc",
["U.sc"] = "U",
u = "U.sc",
["V.sc"] = "V",
v = "V.sc",
["W.sc"] = "W",
w = "W.sc",
["X.sc"] = "X",
x = "X.sc",
["Y.sc"] = "Y",
y = "Y.sc",
["Z.sc"] = "Z",
z = "Z.sc",
},
}
}
\setmainfont{Doves Type}[
SmallCapsFeatures={Ligatures={NoCommon,NoRare}}]
\begin{document}
This is not Small Caps text.
\textsc{This is Small Caps text, WRONGLY affecting only caps.}
{\addfontfeatures{Letters=SmallCaps,Ligatures={NoCommon,NoRare}}This is Small Caps text, WRONGLY AFFECTING only caps.}
{\addfontfeatures{Letters=UppercaseSmallCaps}This is Small Caps text, RIGHTLY AFFECTING only caps.}
\end{document}

For older installations
For older versions of luaotfload
, try this older syntax (see Recent change to luaotfload or fontspec, otf? and How to adjust font features in LuaTeX?):
\directlua{
fonts.handlers.otf.addfeature{
name = "smcp",
{
type = "substitution",
data = {
["A.sc"] = "A",
a = "A.sc",
}
},
"correction of smcp feature"
}
}