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

Khaled Hosny khaledhosny at eglug.org
Wed Feb 16 16:15:34 CET 2011

There is currently no support for Indic scripts in our OpenType layout
engine, simply because no one asked for it.

Since Hans don't read any of these languages, he will need help from
someone who can. So if you are interested in digging into this finding
relivant specs, fonts, reference renderings and so (be warned, Indic
support is OpenType is a big mess with basically two incompatible
standards one deprecated but there are many fonts out there using it),
then contact Hans and I think he would be interested in such help.

Regards,
Khaled

On Wed, Feb 16, 2011 at 04:23:59AM -0700, Aditya Bhargava wrote:
> 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 downloaded that and installed it (separately from
> the 2009 installation, of 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,

--
Khaled Hosny
Egyptian