0

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:

Stylistic set 10, with LaTeX.

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:

Stylistic set 10, with Word.

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).

3

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}
    a/b \addfontfeature{StylisticSet={10}} a/b
\end{document}

enter image description here

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.

Check at the end of the log-file if the right font is used.

  • Thank you, that fixed it! I couldn’t get the package to work, so I ended up uninstalling it entirely so LuaLaTeX would be forced to use the Windows fonts. – confusedandbemused Aug 7 at 9:46
  • And for some reason it’s stopped working. I recompiled the same document a few hours later and it doesn’t load the features any more. I’ve checked that it’s using the correct version of the font. :/ – confusedandbemused Aug 7 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.