[XeTeX] Proper way to set up OT Features

David Perry hospes.primus at verizon.net
Sat Feb 12 02:28:07 CET 2011


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).  Also, I cannot turn off the standard ligatures with the 
Ligatures=NoCommon command.

I suspect that this might have to do with the way I have defined the 
scripts and languages.  All my features are set up this way:

feature onum { # Oldstyle Figures
   script latn;
   language dflt;
     sub @figures by @figures_oldstyle;
   script grek; # Greek
   language dflt;
     sub @figures by @figures_oldstyle;
  } onum;

In other words, I define the script and then the language (dflt only), 
which I thought was the right way.  I'd appreciate any help.

David



More information about the XeTeX mailing list