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}
David Carlisle
  • 757,742

3 Answers3

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

David Carlisle
  • 757,742
chl
  • 8,890
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}).

David Carlisle
  • 757,742
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • (+1) That's very nice because I've look for old sample code where I saw that behavior but without any success.... – chl Feb 07 '11 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.

Suppboi
  • 325