[XeTeX] Proper way to set up OT Features

Adam Twardoch (List) list.adam at twardoch.com
Mon Feb 14 07:47:53 CET 2011


I'd recommend checking the features in raw mode (typing from memory, please double check the syntax): 

\font\cardofont="[/Users/David/Desktop/Cardo-Regular.otf]:+liga,+dlig,+hlig" at 12pt
\cardofont
ghostly firefly acts strange

By accessing the font file directly using it's path, and specifying the features using their OT Layout feature tags, you'll be able to tell if it's a fontspec problem (since this way omits fontspec) or if the problem is somewhere else.

Adam


— Adam

On 13-02-2011, at 09:01, Will Robertson <wspr81 at gmail.com> wrote:

> 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