# Difficulty accessing character variant with LuaLaTeX and fontspec

I’ve already asked a similar question previously, but it seems the same trick doesn’t work. I am using the Junicode (1.002) font available at this link. I want to access the character variant for the long slash; this should be available with StylisticSet=10. However, this is what I get:

The code for this is the following (I would prefer to use addfontfeatures, but I cannot get that to work at all, not even with lowercase numbers… I just don’t understand fontspec).

\documentclass{article}
\usepackage{fontspec}

\setmainfont{Junicode}[
Script={Latin},
Numbers={Lowercase, Proportional},
Kerning=On,
Ligatures={TeX,Required,Common,Contextual}, % plus Rare, Historic
Contextuals={Alternate,WordInitial},
Fractions=On,
StylisticSet={10},
]

\begin{document}
a/b
\end{document}


In Microsoft Word, on the other hand, everything works fine:

What gives?

Edit: Ulrike Fischer’s answer worked for a time, but appears to have broken now that I have updated luaotfload to a more recent version. The warning flagged up at compilation is that below.

Package fontspec Warning: OpenType feature 'Variant=10' (ss10) not available
(fontspec)                for font 'Junicode' with script 'Latin' and
(fontspec)                language 'Default'.

luaotfload | aux : no font with id -1
luaotfload | aux : no font with id -1


Edit II: Trying out a few more things it seems that what is now broken is entirely fontspec/luaotfload-related. I’ve tried a couple of different Windows system fonts (Cambria, Candara) and the log file flags up the same errors. These also include the following sort of thing. Don’t know whether it’s helpful or relevant.

Package fontspec Info: Font family 'Cambria(0)' created for font 'Cambria'
(fontspec)             with options
(fontspec)             [Ligatures=TeX,Script={Latin},Kerning=On,Ligatures={TeX,R
equired,Common,Contextual},Contextuals={Alternate,WordInitial},Fractions=On].
(fontspec)
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"Cambria:mode=node;script=latn;language=DFLT;+tlig;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.:
(fontspec)             - 'bold' (bx/n) with NFSS spec.:
(fontspec)             <->"Cambria/B:mode=node;script=latn;language=DFLT;+tlig;"

(fontspec)             - 'bold small caps'  (bx/sc) with NFSS spec.:
(fontspec)             - 'italic' (m/it) with NFSS spec.:
(fontspec)             <->"Cambria/I:mode=node;script=latn;language=DFLT;+tlig;"

(fontspec)             - 'italic small caps'  (m/itsc) with NFSS spec.:
(fontspec)             - 'bold italic' (bx/it) with NFSS spec.:
(fontspec)             <->"Cambria/BI:mode=node;script=latn;language=DFLT;+tlig;
"
(fontspec)             - 'bold italic small caps'  (bx/itsc) with NFSS spec.:


Edit III: I think luaotfload finds the fonts — if I type luaotfload-tool --find "Junicode/SC" it returns

luaotfload | resolve : Font "Junicode/SC" found!
luaotfload | resolve : Resolved file name "[…]/junicode.ttf"


(i.e. the correct file).

It works fine for me, also with \addfontfeature:

\documentclass{article}
\usepackage{fontspec}

\setmainfont{Junicode}[
Script={Latin},
Numbers={Lowercase, Proportional},
Kerning=On,
Ligatures={TeX,Required,Common,Contextual}, % plus Rare, Historic
Contextuals={Alternate,WordInitial},
Fractions=On,
%  StylisticSet={10},
]

\begin{document}

As there is a Junicode in texlive I put the newer version in my local texmf-tree in fonts/truetype and then called mktexlsr and luaotfload-tool -u -f to force an update of the font cache.