\startluacode
    fonts.handlers.otf.addfeature {
        name = "iast",
        type = "ligature",
        data = {
            ["ऐ"]  = { "a", "i" },
            ["औ"] = { "a", "u" },
            ["ख"] = { "k", "h" },
            ["छ"] = { "c", "h" },
            ["ठ"] = { "ṭ", "h" },
            ["थ"] = { "t", "h" },
            ["फ"] = { "p", "h" },
            ["घ"] = { "g", "h" },
            ["झ"] = { "j", "h" },
            ["ढ"] = { "ḍ", "h" },
            ["ध"] = { "d", "h" },
            ["भ"] = { "b", "h" },
        }
    }
    fonts.handlers.otf.addfeature {
        name = "iast",
        type = "substitution",
        data = {
            ["a"] = "अ",
            ["ā"] = "आ"	,
            ["i"] = "इ",
            ["ī"] = "ई",
            ["u"] = "उ",
            ["ū"] = "ऊ",
            ["ṛ"] = "ऋ",
            ["ṝ"] = "ॠ",
            ["ḷ"] = "ऌ",
            ["ḹ"] = "ॡ",
            ["e"] = "ए",
            ["o"] = "ओ",
            ["ṃ"] = "ं",
            ["ḥ"] = "ः",
            ["˜"] = "ँ",
            ["'"] = "ऽ",
            ["k"] = "क",
            ["c"] = "च",
            ["ṭ"] = "ट",
            ["t"] = "त",
            ["p"] = "प",
            ["g"] = "ग",
            ["j"] = "ज",
            ["ḍ"] = "ड",
            ["d"] = "द",
            ["b"] = "ब",
            ["ṅ"] = "ङ",
            ["ñ"] = "ञ",
            ["ṇ"] = "ण",
            ["n"] = "न",
            ["m"] = "म",
            ["h"] = "ह",
            ["y"] = "य",
            ["r"] = "र",
            ["l"] = "ल",
            ["v"] = "व",
            ["ś"] = "श",
            ["ṣ"] = "ष",
            ["s"] = "स",
        }
    }
\stopluacode

\starttext

\definefontfeature[iast][devanagari-two][iast=yes]
\definedfont[file:shobhika-regular.otf*iast at 18pt]

vid dhātorghañā vedaśabdo niṣpadyate.
vid jñāne vid vicāraṇe vidlṛ lābhe vid
sattāyām ityādidhātubhyo jñānaṃ sattā lābhaśceti trayo'pyarthāḥ siddhyanti. lāb­
haśabdena jīvanarūpā sthitirapi prahītuṃ śakyate sattāpadena cotpattiḥ. tena ut­
pattiḥ sthitiścetyubhayamapi vid dhātorarthe'ntarbhavati. ghañpratyayaścāpi bhāve
akartari ca kārake vidhīyate iti jñānam jñānasādhanam jñānakarma jñānādhikara­
ṇam sattā sattāsādhanam sattākarma sattādhikaraṇam sthiti sthitisādhanam sthi­
tikarma sthityadhikaraṇaścetyādi sarvaṃ vedaśabdārthatayā vyākhyātuṃ śakyate.
tatra granthātmakeṣu vedeṣu śābdajñānasādhanatvameva samanvāyayanti prāyeṇa
vidvāṃsaḥ.
anveṣaṇaprakriyayā pariśīlyamāne tu sarvavidhajñānasādhanam jñā­
narūpatvam sattāsādhanatvam sattārūpatvam sthitisādhanatvam sthitirūpatvam ce­
tyādyapi vedaśabdārthe samanvitaṃ bhavati.

\stoptext
