[OS X TeX] Hoefler and Swashes question

Bruno Voisin bvoisin at mac.com
Sat Apr 21 11:54:44 CEST 2007


Le 21 avr. 07 à 11:28, Jonathan Kew a écrit :

> On 21 Apr 2007, at 3:21 am, Joe Chan wrote:
>
>>> \renewcommand{\encodingdefault}{U}
>>> \renewcommand{\rmdefault}{hoeftxt}
>>
>> Ahh, so these are the two commands that I'm missing. If I add them  
>> to the preamble of my sample doc, it works.
>
> Yes, it will; but this means you're basically ignoring the wonders  
> (and convenience) of Will's fontspec package and setting up fonts  
> "manually" instead. I'd recommend getting rid of all this stuff and  
> using fontspec features to do what you want, as Herb suggested:
>
>>> I use
>>>
>>> \usepackage{fontspec,xunicode,xltxtra}
>>> \defaultfontfeatures{Mapping=tex-text}
>>> \setromanfont[Scale=1.05,ItalicFeatures={Contextuals= 
>>> {NoLineFinal,NoLineInitial}}]{Hoefler Text}
>>>
>>> and it gets rid of the swashes in italic.
>
> (Fontspec will use "EU1" as the default encoding, not "U" -- that  
> was an interim approach people were using in the early days of  
> xelatex. But you shouldn't need to do anything about that in your  
> document; Herb's declarations are all it takes now.)

Fully agreed!

The commands I posted earlier in this thread are what I was using  
before switching to fontspec, at a time fontspec was in the early  
stages of its development and the syntax and functionality of its  
commands were susceptible to change at any moment in a backwards- 
incompatible way.

But that time is long gone now. For example my favorite font  
definition these days is simply:

\usepackage[cm-default]{fontspec}
\usepackage{xunicode,xltxtra}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{Verdana}

Actually, Will Robertson's original fontspec code was based on  
commands similar to those I posted earlier in this thread. But Will  
went way beyond that, added much much more functionality, and  
benefited from ideas, input and code from many messages on the XeTeX  
mailing list.

For example, as you can see by looking at my earlier code, the naming  
of font "options" is inconsistent among the fonts of a same family on  
OS X. Look for example at Number Case, which for Hoefler Text and  
uppercase numbers corresponds to "Upper Case Numbers" for regular,  
"Uppercase Numbers" for italic, "Diphthong Ligatures" for bold,  
"Normal Vertical Position" for bold italic (a bug in the fonts, no  
doubt).

To deal with this, fontspec uses lower-level OS X font code suggested  
by Jonathan Kew if I remember correctly, making it significantly more  
powerful and stable. (IIRC, font "options" are selected using  
counters instead of accessing the options by name.)

Thus there's really no reason not to use fontspec. I still have  
difficulties at times to figure out the exact syntax of its options  
(like the imbricated square and curly braces, and commas, in Herb's  
code above), but in the present case Herb Schulz did all the "hard"  
work for you, so there's really no reason not to use it.

Bruno
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list