[XeTeX] sample .tex file: offlist

Jonathan Kew jonathan_kew at sil.org
Tue Jun 22 10:01:45 CEST 2004


Hi Tim (and Somadeva),

On 22 Jun 2004, at 2:48 am, Tim Lighthiser wrote:

> Jonathan,
>
> I recd a .tex file from Somadeva and some
> instructions: I now have much better understanding of
> what needs to be done.
>
> Therein, I learned of the necessity of putting
> \font\dnA="Devanagari MT:script=deva" at 11pt in the
> preamble and then inputting text with a delimiter such
> as {\dnA
> à¤
> स्त्युत्तरस्यां} with
> the Devanagari-QWERTY palette, and a couple of other
> things.

A clarification is in order here, I think.

Devanagari MT is the Devanagari font Apple ships with Panther. This is 
an AAT-enabled font (and so it renders properly, with conjunct 
formation, reordering of i-matra, etc) in TextEdit and other Unicode 
applications. You don't need a "script=...." option to the \font 
command for an AAT font, as the complex-script behavior is entirely 
controlled by tables in the font and does not depend on the application 
"knowing" what script you're using. (The option will simply be ignored; 
in fact, if you look in the .log file, you'll see a warning message 
"Unknown feature `script=deva' in font `Devanagari MT'.")

So you should find that simplifying the font declaration to 
\font\dnA="Devanagari MT" works just as well. The "Hindi.tex" sample 
file uses just such a font declaration. With AAT fonts, additional 
options on the \font command can be used to control optional 
"typographic features".

The "script=...." option is required if you want complex-script 
rendering with an OpenType font. In this case, the application needs to 
be told which "script shaping engine" to apply to the font. This is 
illustrated by the sample file "HindiOpenType.tex", which uses an 
OpenType Devanagari font I found on the Web.

So, to recap:
* AAT fonts
   - no "script=...." needed
   - optional AAT features can be enabled/disabled as needed (see 
FontFeatures.tex)

* OpenType fonts
   - "script=<tag>" needed for non-Roman shaping
   - Latin fonts can access optional features using 4-character tag names

Hope this is helpful.

Regards,

Jonathan



More information about the XeTeX mailing list