# [XeTeX] Syriac in Polyglossia

François Charette firmicus at ankabut.net
Tue Jul 22 22:31:06 CEST 2008

Gareth Hughes a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I've been testing Polyglossia, and, as I primarily work in Syriac, have
> been testing the package's function with the language.
>
> I can't seem to get Polyglossia to do very much with Syriac but mark
> text as RTL, so that I don't have to call a bidi environment as well.
Yes, the syriac environment selects the appropriate font and switches
the writing direction. What else should it do?

> I can't manage to get numerals=eastern or abjadsyriac to work.
The option numerals=eastern affects the numerals generated from counters
(pagination, footnotes, etc.) To display 2008 in Syriac according to the
above option, you need to type \syriacnumber{2008}. I agree that this is
not very clear in the documentation. I'll improve that! For abjadsyriac
see below. But if you want the numbers 0123456789 to appear
automatically as ٠١٢٣٤٥٦٧٨٩ you can define \syriacfont as follows:

\newfontfamily\syriacfont[Script=Syriac,Mapping=arabicdigits]{Estrangelo Edessa}

I know, this is undocumented. Should this occur by default? Some rendering engines (e.g. Pango) appear to do that substitution automatically with Syriac. I should look further into this.

>  there doesn't seem to be documentation on how to use Polyglossia with Fontspec: that is, how to name font declarations so that Polyglossia can read them.
>
In your example below you did it correctly.

In general, it works as this: if for language lingua one defines
\linguafont with \newfontfamily, then this font is automatically chosen
for that language. If it is undefined, polyglossia checks in the current
font for the availability of the relevant script and/or language (via
OpenType tags) and makes the appropriate switch with \addfontfeature.
Otherwise an error message is displayed.

> Could someone give me a few pointers here? Details of the issue are below.
>
> Thanks,
>
> Gareth.
>
> I'm using XeTeX 3.141592-0.996 on Ubuntu. A minimal example is:
>
> \documentclass[12pt,a4paper]{minimal}
>
> \usepackage{fontspec,xltxtra,xunicode}
> 	\setmainfont{Linux Libertine}
> 	\newfontfamily\syriacfont[Script=Syriac]{Estrangelo Edessa}
>
> \usepackage{polyglossia}
> 	\setdefaultlanguage{spanish}
> 	\setotherlanguage[numerals=eastern]{syriac}
>
> \begin{document}
>
> \begin{syriac}
> \end{syriac}
>
>
According to my sources the maximal abjad number in Syriac is 499: if
you look at your log file you'll notice that polyglossia issued a
warning about 2008 being too large. However, if you know how to
represent numbers larger than 499, I would be grateful to have the
information!

Regards,
François