[XeTeX] Mixed Roman and Indian alphabets for Sanskrit

Javier Bezos listas at tex-tipografia.com
Sat Feb 18 12:59:38 CET 2017


>     \usebabelfont[*devanagari]{FontName}

Just a little explanation about its behavior. If we say

\selectlanguage{sanskrit}

then both the language and the script will be set. More precisely,
using the info in the new language files I'm writing (almost by hand!),
babel will do at this point something similar to:

\fontspec[Language=Sanskrit,Script=Devanagari]{FontName}

(Actually, things are a bit more complicated.) Note the selection
will be always with the language, not with the script. This means
the following makes sense

\usebabelfont[*arabic]{FontName}

\selectlanguage{arabic}
\selectlanguage{urdu}

which will do:

\fontspec[Language=Arabic,Script=Arabic]{FontName}
\fontspec[Language=Urdu,Script=Arabic]{FontName}

But if we want two different fonts, we could say

\usebabelfont[arabic]{ArabicFontName}
\usebabelfont[urdu]{UrduFontName}

Javier





More information about the XeTeX mailing list