[XeTeX] Proper way to set up OT Features

David J. Perry hospes.primus at verizon.net
Tue Feb 15 04:49:00 CET 2011


Will,

Thanks for the reply.  Having spent the larger part of Sunday testing on 
some additional machines, I can report the following.  All tests were 
conducted using the same exact font file (a PS-flavor OTF).  MiKTeX is kept 
updated.  If anybody has an idea about why the font works in XeLaTeX on Mac 
and Win7 but fails (in different ways) on the two Vista systems, I would 
really like to know.

Mac OS 10.6, MacTeX distribution:
complete success with Mellel and TextEdit; mostly good with XeLaTeX (see 
below)

The one problem with XeLaTeX involved a feature (hist) in which I replaced a 
long s with a regular s if certain characters (comma, period, space, etc.) 
immediately followed the long s.  After seeing Khaled's message today I 
understand why this doesn't work.

Win7, MiKTeX 2.9
mostly good with XeLaTex (same problem as above); Word 2010 failed with hlig 
and dlig, OK with liga and onum and pnum

WinVista SP1, MiKTeX 2.9
as previously reported, no OT features except liga worked if implemented in 
the body of the document with \addfontfeatures; if implemented in the 
preamble as part of \setmainfont[]{}, everything worked.  Could not turn off 
liga with NoCommon.  Let me repeat: same exact font file as used for the 
previous two tests.  This is bizarre.

[disclaimer; I realize MiKTeX 2.9 officially requires SP2 on Vista.  This 
machine refuses to upgrade to SP2, so the test may not be completely valid. 
But I use XeLaTex on this machine frequently and other OT fonts such as 
Linux Libertine work correctly.]

WinVista SP2, MiKTeX 2.9
Font generally seems OK with Word and OpenOffice Writer, although neither 
supports OT features so I can't test that aspect of things.  However, the 
font fails completely in XeLaTex; "Now" appears as "Opx".  Same exact font 
file, folks.  I already tried uninstalling and reinstalling MiKTeX; no 
improvement.  You can see why I am going crazy with this.

David

----- Original Message ----- 
From: "Will Robertson" <wspr81 at gmail.com>
To: <xetex at tug.org>
Sent: Sunday, February 13, 2011 3:01 AM
Subject: Re: [XeTeX] Proper way to set up OT Features


> On 2011-02-12 11:58:07 +1030, David Perry <hospes.primus at verizon.net> 
> said:
>
>> In one of my fonts, I'm having a hard time getting the OT features to
>> work correctly in XeLaTeX.
>>
>> If I include the following line:
>> \setmainfont[Numbers=Lowercase,Ligatures={Rare,Historical}]{Cardo}
>>
>> then the oldstyle numerals and ligatures work fine.  If I omit the
>> options from the \setmainfont command and add the features in the body
>> of the document using the normal \addfontfeature{ } or \addfontfeatures{
>> }, the features don't work (but there are no error messages during
>> compilation).
>
> Hmmm, is this a bug in fontspec? I can't think of an alternative 
> explanation. Can you try it out with a different font?
>
>> Also, I cannot turn off the standard ligatures with the
>> Ligatures=NoCommon command.
>
> I think this is a font problem; this option corresponds to the OpenType 
> "liga" feature.
>
> But I don't have much experience with creating OT features in a font; I 
> hope others here can provide more info...
>
> Will
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex 



More information about the XeTeX mailing list