On Mon, Jun 09, 2008 at 11:08:09PM +0200, Hans Hagen wrote: > Khaled Hosny wrote: > > Luatex does not mirror characters that has a Bidi_Mirrored property when > > the text direction is set to RTL (TRT in Aleph), according to > > http://unicode.org/reports/tr9/#Mirroring, the different types of > > parenthesis that has Bidi_Mirrored property should be mirreored in RTL > > mode, but this isn't what I get. Is this a bug, feature, or am I missing > > some thing? > > experimental in the beta > > \setcharactermirroring[1]
It does work perfectly with unidirectional texts (RTL or LTR), but when mixing bi-directional text, like Arabic text between brackets inside English line, the closing bracket takes the direction of the embedded text not the main line. See the attached example. Regards, Khaled > > no high level interface yet, i need to think of how to do such things as > efficient as possible and prevent interference with font features and > such (currently it's an attribute handler that pops in quite early) > > > -- > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ -- Khaled Hosny Arabic localizer and member of Arabeyes.org team
% engine=luatex
% OpenType features needed for Arabic
\definefontfeature
[arab]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\font\Arab = arabtype*arab
\setcharactermirroring[1]
\hoffset=0pt
% For inner paragraph control within an LR paragraph
\definestartstop
[arabictext]
[commands=%
{\textdir TRT%
\Arab}]
\def\ArabicText#1{\startarabictext#1\stoparabictext}
% For separate Arabic-script paragraphs
\def\ArabicDirPar{\textdir TRT\pardir TRT}
\definestartstop
[arab]
[commands=%
{\Arab%
\ArabicDirPar}]
\showframe[text]
\starttext
\startarab
سلام (قوس) وقوس <قوس> و [قوس]
وهذا قوس حول نص غير عربي \textdir TLT (hello) \textdir TRT ثم عربي
\stoparab
\blank
Here is some mixed {\em Arabic-} (\ArabicText{عربي}) and
Latin-script. As you can see, Aleph does a very good job mixing
{\em LR} (\ArabicText{يسار-يمين}) and {\em RL}
(\ArabicText{يمين-يسار}) texts. \ArabicText{و
هنا جملة منقطعة في وسط قرينة
لاتينية}. Aleph even does a great job breaking Arabic
phrases across lines.
(bracket) and <bracket> and [bracket]
\stoptext
mirroring.pdf
Description: Adobe PDF document
signature.asc
Description: Digital signature
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
