4

I'm using XeTeX (MacTex 2010, Mac OSX 10.6) to render a document in Apple Hoefler Text. However, although I can make it render common ligatures, such as fi and ffi, I can't seem to be able to force it using some extended ligatures as those displayed here. Any suggestions? Here's the code I am using:

\documentclass[10pt]{article}
\usepackage{fontspec,xltxtra}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\fontspec[Mapping=tex-text, Ligatures={Common, Rare, Historic}]{Hoefler Text}

\begin{document}\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}
9
  • Possible duplicate: Ligatures in Hoefler with XeTeX? Commented Feb 7, 2011 at 18:13
  • It seems the duplicated article is only focused on rendering any ligatures, while my question is about rendering the extended family of ligatures. Commented Feb 7, 2011 at 18:18
  • Are you running OSX 10.5.x or 10.6.x?
    – morbusg
    Commented Feb 7, 2011 at 18:32
  • @morbusg: Just added the MacTex and OSX versions. Commented Feb 7, 2011 at 18:35
  • does it work if you replace \fontspec with \setmainfont?
    – Philipp
    Commented Feb 7, 2011 at 18:53

3 Answers 3

4

Did you try to compile the examples given by Dario Taraborelli on his page, The Beauty of LATEX, especially the Hoefler sample? It seems to work for me (OS X 10.6, TexLive 2010). The trick is to pass Alternate=1 to \fontspec (see the fontspec documentation with e.g. texdoc), as in

\fontspec[Ligatures={Common, Rare}, Alternate=1]{Hoefler Text}
\fontsize{24pt}{30pt}\selectfont 
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie\

for the third paragraph below:

enter image description here

2
  • Thank you, that worked. Do you know how to disable the Alternate for \emphs{} and keep it for normal font? Commented Feb 7, 2011 at 19:45
  • 1
    Found the answer: \setmainfont[Mapping=tex-text, ItalicFeatures={Alternate = 0}, Ligatures={Common,Rare,Historic},Alternate=1]{Hoefler Text} Commented Feb 7, 2011 at 20:15
2

For me

\documentclass[10pt]{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text,Ligatures={Common, Rare}]{Hoefler Text}
\begin{document}
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}

works but something like

\documentclass[10pt]{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\fontspec[Ligatures={Common, Rare}]{Hoefler Text}
\begin{document}
\noindent
Que dictes vous de mon appel, \\
Toute beste garde sa pel \\
Qui la constraint, efforce ou lie
\end{document}

does not. So you need to watch that you set your font features with the main loading, if you do it in the preamble (all is fine if you put \fontspec[Ligatures={Common, Rare}]{Hoefler Text} after \begin{document}).

1
  • (+1) That's very nice because I've look for old sample code where I saw that behavior but without any success....
    – chl
    Commented Feb 7, 2011 at 21:50
1

With Hoefler Text Pro 1.201 you need to type \fontspec{Style = Historic, Ligatures = Historic}{Hoefler Text Pro}

However, if you are uncertain of the features your font contains, you are better off checking what features your font has, one solution is FontLab Studio or fontForge. Then check how to enable such features, on section 15 "OpenType Features" in the fontspec documentation; there's a table in page 37, listing all supported features. If for whatever reason there are features you would like to use, but are not supported by fontspec, you can add them using the \newopentypefeature command, explained on section 22 "Defining new features".

As to adding new features to your specific font file you might want to check FontLab Studio, fontForge or Adobe's AFDKO, and resolve to checking Adobe's documentation on OpenType features.

4
  • Are you sure that you need to set a Style attribute?
    – TeXnician
    Commented Nov 8, 2017 at 18:20
  • It loads the long S for me, I dont know if you're on a mac the font is different
    – Suppboi
    Commented Nov 8, 2017 at 20:34
  • @TeXnician I hope this updated answer further helps you
    – Suppboi
    Commented Jan 29, 2018 at 22:34
  • I've been trying Dario Taraborelli's code in MacTex 2020 and it does not work as is anymore, apparently. I haven't been able to fix it.
    – Frank
    Commented May 28, 2020 at 22:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .