[XeTeX] Syriac in Polyglossia
Sargon Hasso
sargon.hasso at gmail.com
Sat May 2 03:29:48 CEST 2009
Thank you very much! I can't thank you enough and you are right it does
improve the output greatly.
There was one glitch however and I was able to figure it out and fix it
rather easily (with little insight). The kashida was slightly misplaced
between characters above the base line with fonts I am using with dramatic
effects. I changed this line:
\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
\leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
to
\def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
\leaders\hrule height\ht0 \hskip0pt plus 0.0em \zwj}
(\hskip0pt plus 0em from \hskip0pt plus 0.5em)
(see attached image before and after).
And yes I thank Vafa too because she sent me a code the other day to reverse
a 2-column syriac document from her xpersian package.
Thanks,
Sargon
On Fri, May 1, 2009 at 11:36 AM, Fr. Michael Gilmary <
FrMichaelGilmary at maronitemonks.org> wrote:
> OOPS ... forgot the file!
>
>
> --
> United in adoration of Jesus,
>
>
> fr. michael gilmary, mma
>
> Most Holy Trinity Monastery
> 67 Dugway Road
> Petersham, MA 01366-9725
>
>
>
> %% Configure xetex to do "kashida" justification in Persian/Arabic/Syriac
> text --- from Jonathan Kew, modified for Syriac
>
> \chardef\zwj="200D % zero-width joiner
> \chardef\ksh="0640 % kashida = Syriac/Arabic "tatweel"
>
> \chardef\D=10 % dual-joiner class
> \chardef\L=11 % lam
> \chardef\R=12 % right-joiner
> \chardef\A=13 % alef
> \chardef\V=256 % vowel or other combining mark (to be ignored)
>
> \def\kashida{\zwj\nobreak \setbox0=\hbox{\ksh}%
> \leaders\hrule height\ht0 \hskip0pt plus 0.5em \zwj}
>
> \def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
> \expandafter\dosetclass\charlist,\end}
> \def\dosetclass#1,#2\end{%
> \def\test{#1}\def\charlist{#2}%
> \ifx\test\empty\let\next\finishsetclass
> \else \XeTeXcharclass "\test = \theclass
> \let\next\dosetclass \fi
> \expandafter\next\charlist,,\end}
> \def\finishsetclass#1,,\end{}
>
> %% code for Melthofonts = Syriac fonts
> \setclass \A {710}
> \setclass \R {0715,0717,0718,0721,0728,072A,072C}
> \setclass \D {0712,0713,071A,071B,071D,071F}
> \setclass \D {0722,0723,0725,0729,072B}
> \setclass \L {0720}
> \setclass \V {0730,0731,0732,0733,0734,0735}
> \setclass \V {0736,0737,0738,0739,073A,073B,073C}
> \setclass \V {073D,073E,073F,0740,0741,0742,0743}
> \setclass \V {0744,0745,0746,0747,0748}
>
>
> % JK's code for Arabic/Farsi fonts
> \setclass \A {0622,0623,0625,0627}
> \setclass \R {0624,0629,062F,0630,0631,0632,0648,0698}
> \setclass \D {0626,0628,062A,062B,062C,062D,062E}
> \setclass \D {0633,0634,0635,0636,0637,0638,0639,063A}
> \setclass \D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
> \setclass \D {067E,0686,06A9,06AF,06CC}
> \setclass \L {0644}
> \setclass \V {064B,064C,064D,064E,064F,0650,0651,0652}
>
>
> \XeTeXinterchartoks \D \D = {\kashida}
> \XeTeXinterchartoks \L \D = {\kashida}
> \XeTeXinterchartoks \D \L = {\kashida}
> \XeTeXinterchartoks \L \L = {\kashida}
> \XeTeXinterchartoks \D \R = {\kashida}
> \XeTeXinterchartoks \D \A = {\kashida}
> \XeTeXinterchartoks \L \R = {\kashida}
> \XeTeXinterchartoks \L \A = {}
>
> \XeTeXinterchartokenstate=1
>
> \endinput
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20090501/fc325c7e/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KashidaDim.png
Type: image/png
Size: 15989 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20090501/fc325c7e/attachment-0001.png
More information about the XeTeX
mailing list