6

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

  • 1
    Have you tried \char"E1A2 (for the extravagant swash) and \char"E1A3 (for the moderate swash)? – Mico Oct 21 '14 at 21:06
  • @Mico Seems to work. How did you get to that? – 1010011010 Oct 21 '14 at 21:10
  • 1
    I downloaded the font and examined its glyphs using the free Fontforge app to find the glyphs' unicode numbers. A paid app such as FontExplorer X will you this information as well. – Mico Oct 21 '14 at 21:12
  • @Mico You could post this as a preliminary answer. I'll accept a more fontspec-oriented answer if it appears, though. – 1010011010 Oct 21 '14 at 21:21
  • A minor note. I didn't read 90% of your question, as all I needed to know was mentioned in the first two-three lines. Please make your questions and code samples a bit more minimal in the future. That way you're more likely to receive an answer :) – Sverre Oct 21 '14 at 21:42
4

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.

  • Going by Fontspec’s manual, the Alternate feature activates OpenType’s stylistic alternates (salt), not access all alternates (aalt). – Wrzlprmft Jul 14 '15 at 8:17
  • Will the downvoter care to explain why this answer deserves a downvote? – Sverre Jul 17 '15 at 10:41

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.