As I gather from the mailing lists, LuaTeX is currently unable to render devanagari properly because it doesn't understand the complex ligature rules involved. This is my experience with test documents, as well.
Is there anything I can do about this?
- Can I somehow add proper devanagari rendering myself without digging deep into the guts of LuaTeX? I'm handy enough with code but suspect the core processes here go way above my paygrade.
- Since the answer to the first question is probably "very no", can anyone suggest a kludge that will get small chunks of accurate devanagari into a predominantly English document?
Right now, I use a perl script to convert a minimally marked up document into (Xe)LaTeX. Eventually, I'd like to convert my process over to ConTeXt-mkiv, but devanagari support is a hard requirement.
UPDATE:
phg's comment has me hopeful that I'm just doing something wrong. I'm still trying to wrap my head around typescripts, in particular.
The following example:
\definefontfeature[dev][devanagari-two][script=dev2]
\starttypescript [serif] [devanagarimt]
\definefontsynonym [DevanagariMT-Light] [name:DevanagariMT] [features=dev]
\stoptypescript
\starttypescript [serif] [devanagarimt]
\usetypescript[serif][fallback]
\definefontsynonym [Serif] [DevanagariMT-Light] [features=dev]
\stoptypescript
\starttypescript [DevanagariMT]
\definetypeface [DevanagariMT] [rm] [serif] [devanagarimt] [default]
\stoptypescript
\usetypescript[DevanagariMT]
\setupbodyfont[DevanagariMT,11pt]
\starttext
श्रेयो हि ज्ञानमभ्यासाज्ज्ञानाद्ध्यानं विशिष्यते ।
ध्यानात्कर्मफलत्यागस्त्यागाच्छन्तिरनन्तरम् ॥
\stoptext
Produces this:
But it should produce this (from XeTeX):
I suspect that some devanagari-specific processing is happening here, because some things do indeed work:
the second word: ह + ि produces हि (like it should), but
the first glyph of the first word: श + ् + र + े should produce श्रे but doesn't.
This might just be an incomplete implementation as yet, but I hope there's a mistake in my code. Is there anything obviously wrong here? I've tried a few different fonts with similar results.