[XeTeX] Syriac: Text Direction

Bruno Voisin bvoisin at mac.com
Sat Apr 28 23:00:14 CEST 2007


Le 28 avr. 07 à 21:36, Thomas Thackery a écrit :

> Thank you for the help.  The "Script=" solved the vowel and  
> connection issues.  The last remaining bit is to get it to display  
> right-to-left; i.e., each word is written correctly, but the  
> sentence as a whole is written in the wrong direction.  In the  
> attached example, the text on top (from Accordance) correctly shows  
> the RTL.  The bottom example, from Xe(La)Tex; displays improperly  
> from left-to-right.

Might this be connected with that clarification from another thread:

<http://tug.org/pipermail/xetex/2007-April/006214.html>

And specifically, to:

> Le 17 avr. 07 à 14:43, Jonathan Kew a écrit :
>
>> On 17 Apr 2007, at 1:34 pm, Bruno Voisin wrote:
>>
>>> - Call fontspec as above, and use xdvipdfmx. Output is:
>>>
>>> yz vwx stu pqr mno jkl ghi def abc
>>
>> Here, the LM font is being used as a Unicode/OpenType font, so within
>> each word, the directionality of the characters is controlled by
>> their Unicode properties. So you get left-to-right text within each
>> word, even though the overall paragraph direction is right-to-left.
>>
>>> - Call fontspec with option [cm-default]. With both xdv2pdf and
>>> xdvipdfmx, output is:
>>>
>>> zy xwv uts rqp onm lkj ihg fed cba
>>
>> With TFM-based fonts, the directionality from \beginR applies at the
>> level of the individual characters (as they have no inherent
>> directionality of their own, and no reliably-known association with
>> Unicode values).
>>
>> So your observation is as expected; the bidi behavior is slightly
>> different depending whether you're using TFMs or not. Of course, this
>> isn't important for any "normal" use, only for strange things such as
>> "right-to-left English" (for which you'd need to use Unicode
>> directional overrides if you really want it to work with Unicode/OT
>> fonts).

In short, because XeTeX constructs text word by word, while standard  
TeX construct text character by character:

- With traditional TeX fonts, for which TFM files exist, in right-to- 
left mode character ordering is reversed (with respect to left-to- 
right).

- With AAT or OpenType fonts, in right-to-left mode only word  
ordering is reversed, and to reverse character ordering within each  
word you need to activate a switch within the font itself.

That said, I looked through the fontspec doc to find the  
corresponding option (the corresponding instruction within [] when  
loading the font), and couldn't find anything.

Bruno Voisin


More information about the XeTeX mailing list