Indic special characters on XeLaTeX

I am using XeLaTeX (XeTeX, Version 3.1415926-2.4-0.9998 on TeX Live 2012/W32TeX). There are some special Indic unicode characters which XeLaTeX does not seem to support. I am trying to produce character र्ऋ - which is character no. 1011 on this page - http://ccat.sas.upenn.edu/plc/tamilweb/trans/unicodehindi.html - it is combination of three unicode symbols hexadecimal codes are 0930, 094d, 090b. In Word, I can type using 0930 Alt-X 094d Alt-X 090b Alt-X which produces र्ऋ correctly. Then I can copy paste and all applications like notepad, Firefox, get it right. But in XeLaTeX it does not work. The following compiles successfully, but renders र्ऋ as "र् ऋ" (without a space in between). The hex chars also do not work.

\documentclass[14pt]{article}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Arial Unicode MS}
\begin{document}
र्ऋ \char"0930\char"094d\char"090b
\end{document}


Thanks in advance.

Update on 2012-12-15: This works fine with Sanskrit 2003 font. I am yet to find a solution for Arial Unicode MS though.

\documentclass[14pt]{article}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Sanskrit 2003}
\begin{document}
रृ
\end{document}

• The hexadecimal digits must be uppercase; try \char"0930\char"094D\char"090B. However, by copying and pasting र्ऋ I get the expected result (with the FreeSerif font). – egreg Nov 17 '12 at 17:55
• TexLive 2012 on Windows with Sanskrit 2003 font has a problem with the Unicode sequence 0930-094d-090b (automatically rendered as र्ऋ in Word or Notepad). I tried the Unicode sequence 0930 0943 (रृ) instead. TexLive 2012 using Sanskrit 2003 font cannot typeset the triple Unicode sequence correctly. But the double Unicode sequence works fine and is rendered ultimately as र्ऋ. – user22209 Dec 15 '12 at 10:35

2 Answers

Depends on the font designer, I think: how they arrange conjuncts and so on. And whether they are a Sanskritist.

Here is the word rishi (sage):

(Arial Unicode MS is OK, in this regard.)

And here it is with consonant R added in front (र्ऋषि = र + ् + ऋ + ष + ि); and in front of that, consonant R + vocalic R vowel marker (रृ):

Only the Sanskrit-orientated fonts have a ligature for it.

Note that the browser composite font used will affect whether the old or new shape is rendered for vocalic R as a full letter (vowel), so what is seen may vary for different viewers.

• Many of these combinations never occur in Sanskrit, so it's IMO acceptable for the font to not bother with ligatures for some of them... in fact for the रृ case, it's debatable which one is correct: whether it's the versions showing the र (Arial Unicode MS, Aparajita, Baloo, FreeSerif), or the ones that show the vowel ऋ (Noto Sans Devanagari, Sanskrit 2003, Sanskrit Text). My preference in fact would be for the former. The second word starting with a half-r is entirely nonsense and unpronounceable; preceded by a vowel would make more sense. – ShreevatsaR Oct 23 '19 at 17:04
• @ShreevatsaR, Indeed :) the only use I could think of was when the cat goes rrṛṛṛ-ṝṝrrṝṛṝ-ḥṝṝrrrrṛṛ, or as a special-effect in a manga. – Cicada Oct 24 '19 at 11:18

Using this currently - works with my font. The question may be considered solved for now.

\documentclass[14pt]{article}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Sanskrit 2003}
\begin{document}
रृ
\end{document}