XeLaTex error with using TECkit mapping (RomDev for Roman to Devanagari script)

I'm attempting to typeset Devanagari in XeLaTeX. I'm using the font chandas.ttf and the RomDev mapping (for roman --> devanagari script; found here: RomDev from somadeva). This worked for me once upon a time. But now when I compile, I only get output in Roman script and an error message:

*************************************************
* fontspec warning: "script-not-exist-latn"
*
* Font 'Chandas' does not contain script 'Devanagari'.
*************************************************


Here's the code:

\documentclass[12pt]{article}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{xltxtra}

\setmainfont[Script=Devanagari,Mapping=RomDev]{Chandas}
\setmainlanguage{sanskrit}

\begin{document}

śarvavarmā tataścedamadbhutaṃ vākyamabravīt || śrutimantaṃ me kurviti   prāguktaṃ deva me tvayā |

\end{document}


I downloaded and installed chandas.ttf from its website, and compiled the above file. It produced output looking like this:

but without the fontspec warning that you see (which is anyway irrelevant and not related to your issue, despite appearing related). There's nothing in the shell output, but buried somewhere in the .log file is this:

Font mapping RomDev.tec' for font Chandas' not found.


Well, duh. So I downloaded RomDev.map (here), moved it into the same directory, and ran

teckit_compile RomDev.map -o RomDev.tec

Now with RomDev.tec present in the same directory, compiling the file again with XeLaTeX gives output that looks like this, as desired:

Problem solved.

There are ways to make it work without RomDev.tec being in the same directory; you can pursue those if interested.