[Tex/LaTex] Accessing an alternate representation of a letter in fontspec

fontspecluatex

Recently I've been trying to access a specific letter from the WatersTitlingPro-Rg font, through LuaLaTeX and fontspec. The Waters Titling Pro fonts is a small caps only font. Specifically, I'm looking for a swashed R. I seem to be unable to access this character in LuaLaTeX, using the current answers at my disposal. Notable on the subject are two questions and the answers thereto:

  1. How can I access a specific glyph in LuaLaTeX/Fontspec?
  2. Access specific characters in LuaTeX

Adobe InDesign shows that the font is alive and kicking:

http://i.imgur.com/zNDcA0N.png?1

I just can't seem to use the OpenType features of this specific font. Using e.g. Zapfino Extra LT Pro, I can use the key Variant=<number> to easily go through each variant of a particular letter:

http://i.imgur.com/tu5anYC.png?1

\documentclass[a4paper]{article}
\usepackage{geometry}
\usepackage[dutch]{babel}
\usepackage{fontspec}
\pagenumbering{gobble}

\newcommand{\va}[1]{\fontspec[Variant=2]{Zapfino Extra LT Pro}#1}
\newcommand{\vb}[1]{\fontspec[Variant=3]{Zapfino Extra LT Pro}#1}
\newcommand{\vc}[1]{\fontspec[Variant=4]{Zapfino Extra LT Pro}#1}
\newcommand{\vd}[1]{\fontspec[Variant=5]{Zapfino Extra LT Pro}#1}
\newcommand{\ve}[1]{\fontspec[Variant=6]{Zapfino Extra LT Pro}#1}
\newcommand{\vf}[1]{\fontspec[Variant=7]{Zapfino Extra LT Pro}#1}
\newcommand{\vg}[1]{\fontspec[Variant=8]{Zapfino Extra LT Pro}#1}

\begin{document}

\parbox[t]{.9\linewidth}{%
\lineskiplimit=-\maxdimen\relax\linespread{1.4}{%
   \fontspec[Ligatures={Common, Rare}]{Zapfino Extra LT Pro}\fontsize{25pt}{25pt}\selectfont 
   %
   {\vc I}{\vd k} heb {\vf g}ezoc{\vd h}t {\vb n}aar {\vg d}e\hskip7pt {\va A}la{\vf dd}in la{\va m}p op e{\vd b}ay en ik heb hem {\vg g}eloof ik oo{\vd k} {\vb g}evonden! {\va M}aar i{\va k} {\vc k}wam uit rond de 120 euro, vanwe{\vb g}e de verzend{\va k}osten en dergelijke. {\vb J}e hebt mijn toestemmin{\vd g} om {\vc z}o {\vc j}i{\vd j} wi{\vc l} mi{\va j}n com{\vc p}uter en e{\vc b}a{\vc y}-accoun{\va t} {\vf t}e gebrui{\vd k}en {\vc h}ier.\par
   %
   }}

  \end{document}

Naturally this doesn't work for the Waters Titling Pro font. I'm not getting explicit errors, but investigation of the log files shows that e.g. the ss04 font is not defined in the font:

luaotfload | aux : font no 26 (WatersTitlingPro-Rg) does not define feature ss04

I also can't access the variant using different Variants like I did for Zapfino Extra LT Pro.

Looking even further, the output of the exact same document as above, except with the Waters titling font, shows at least some usage of Ligatures:

http://i.imgur.com/K9ALfor.png?1

\documentclass[a4paper]{article}
\usepackage{geometry}
\usepackage[dutch]{babel}
\usepackage{fontspec}
\pagenumbering{gobble}

\newcommand{\va}[1]{\fontspec[Variant=2]{Waters Titling Pro}#1}
\newcommand{\vb}[1]{\fontspec[Variant=3]{Waters Titling Pro}#1}
\newcommand{\vc}[1]{\fontspec[Variant=4]{Waters Titling Pro}#1}
\newcommand{\vd}[1]{\fontspec[Variant=5]{Waters Titling Pro}#1}
\newcommand{\ve}[1]{\fontspec[Variant=6]{Waters Titling Pro}#1}
\newcommand{\vf}[1]{\fontspec[Variant=7]{Waters Titling Pro}#1}
\newcommand{\vg}[1]{\fontspec[Variant=8]{Waters Titling Pro}#1}

\begin{document}

\parbox[t]{.9\linewidth}{%
\lineskiplimit=-\maxdimen\relax\linespread{1.4}{%
   \fontspec[Ligatures=TeX]{Waters Titling Pro}\fontsize{25pt}{25pt}\selectfont 
   %
   {\vc I}{\vd k} heb {\vf g}ezoc{\vd h}t {\vb n}aar {\vg d}e\hskip7pt {\va A}la{\vf dd}in la{\va m}p op e{\vd b}ay en ik heb hem {\vg g}eloof ik oo{\vd k} {\vb g}evonden! {\va M}aa{\vc r} i{\va k} {\vc k}wam uit rond de 120 euro, vanwe{\vb g}e de verzend{\va k}osten en dergelijke. {\vb J}e hebt mijn toestemmin{\vd g} om {\vc z}o {\vc j}i{\vd j} wi{\vc l} mi{\va j}n com{\vc p}uter en e{\vc b}a{\vc y}-accoun{\va t} {\vf t}e gebrui{\vd k}en {\vc h}ier.\par
   %
   }}

  \end{document}

Tweaking the Ligatures=<argument> key, for e.g. Ligatures=TeX yields the exact same output.

Alternatively, I could use e.g. the RawFeature key or StylisticSet (as described in section 9.7 on http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/fontspec/fontspec.pdf), but neither of these produce the expected result.

Checking the Adobe page, I find the following: http://store1.adobe.com/type/browser/pdfs/OTGuide.pdf (check page 13, all the way down, for font features)

This suggests I should add a RawFeature=+swsh key or so. That doesn't seem to work either (in fact, it has no effect in LuaLaTeX).

As such, I'm a bit confused as to how I'm supposed to access the swashed R with fontspec. I've messed around with the main document so much that it won't even recognise the Variant key anymore. :-/


PS: Since I'm considering the possibility of a font-specific problem, I'll supply the fonts at https://mega.co.nz/#F!aEQDmY5a!aIcgBHK-vNdVMCxWfOidGg for as long as the problem persists (since I'm technically not allowed to distribute them).

Best Answer

You can access this glyph by setting the Alternate option to 0 (zero):

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Path = <path>, Alternate = 0]{WATERSTITLINGPRO-RG}
\begin{document}
R
\end{document}

(<path>is where I specify the folder to which I downloaded your font ... )

enter image description here

How did I know? Well, FontForge tells me that the glyph has the name R.alt1, and the font's lookup tables say that R is replaced by R.alt1 with the aalt feature activated. I simply guessed that this would mean Alternate (the fontspec manual doesn't mention all OpenType features, so you need to guess sometimes). The option is set to 0 because fontspec under XeTeX counts from 0 (cf. the manual on page 30). If you set Alternate = 1, then R will be substituted with R.alt2.

The fontspec manual says that luaotfload counts from 1, so if you're using luatex, you might need to set Alternate = 1 instead.