# [luatex] luatex's (mis-)handling of Unicode Devanagari vowel signs and ligatures

Wed Feb 16 12:23:59 CET 2011

Hello all,

I have recently found myself needing to include small bits of text (words)
from various languages in a latex document. To try and make this easier on
myself, I decided to try out lualatex, and originally steered clear of
xelatex because I wanted a tex engine that would provide PDF natively (I
also want to be try out the microtype package, but this isn't terribly
important). I'm doing this on Ubuntu 10.10, which uses TeX Live 2009, and
since the examples I found all used fontspec which (as I recall, and
hopefully read correctly) didn't work with luatex until TeX Live 2010, I
course). All of my runs have been done using what is included with TeX Live
2010 (though I did grab the latest source for luaotfload, since there was an
infinite loop bug that got fixed recently).

I got Cyrillic, IPA, and Japanese displaying well, but the Devanagari script
(for Hindi) has been causing me some problems. In particular, the vowel
signs and ligatures are not being rendered (if that's the right word)
correctly, and this is the case using any font. I gave xelatex a shot (which
I am stuck with for now), and it seems to handle them correctly. I can
describe it, or I can just show you---I didn't want to attach PDFs as I'm
not sure what the rules are for this list, so you can grab them online:

And here is the code that generated them:

\documentclass[11pt]{report}
\usepackage{fontspec}
%\usepackage[english]{babel}
\newcommand{\hindi}[1]{{\fontspec[Script=Devanagari]{Nakula}#1}}
\begin{document}
Here is the word:\\
\hindi{गर्शविन}\\
The Unicode character sequence is:\\
\hindi{ग र ् श व ि न}\\
a.k.a.\\
\texttt{U+0917 U+0930 U+094D U+0936 U+0935 U+093F U+0928}
\end{document}

Which you can grab from:

Hopefully you can see what the issue is; I've included the characters
separately so that you can see the whole sequence. If it's not clear from
the PDFs I can elaborate further.

I should be OK using xelatex for now, but if this is a bug hopefully now
it's known and can be treated as such. If I'm doing something wrong, I'd
love to hear it!

TIA,