local yes = "yes"

local basics = {
    analyze  = yes,
    mode     = "node",
    language = "dflt",
    script   = "arab",
}

local analysis = {
    ccmp = yes,
    init = yes, medi = yes, fina = yes,
}

local regular = {
   rlig = yes, calt = yes, salt = yes, anum = yes,
   ss01 = yes, ss03 = yes, ss07 = yes, ss10 = yes, ss12 = yes, ss15 = yes, ss16 = yes,
   ss19 = yes, ss24 = yes, ss25 = yes, ss26 = yes, ss27 = yes, ss31 = yes, ss34 = yes,
   ss35 = yes, ss36 = yes, ss37 = yes, ss38 = yes, ss41 = yes, ss42 = yes, ss43 = yes,
   ss55 = yes,
   js16 = yes,
}

local positioning = {
   kern = yes, curs = yes, mark = yes, mkmk = yes,
}

local minimal_stretching = {
    js11 = yes, js03 = yes,
}

local medium_stretching = {
    js12=yes, js05=yes,
}

local maximal_stretching= {
    js13 = yes, js05 = yes, js09 = yes,
}

local wide_all = {
    js11 = yes, js12 = yes, js13 = yes, js05 = yes, js09 = yes,
}

local shrink = {
    flts = yes, js17 = yes, ss05 = yes, ss11 = yes, ss06 = yes, ss09 = yes,
}

local default = { -- we need to merge the typescript definition in here
    basics, analysis, regular, positioning, -- xxxx = yes, yyyy = 2,
}

return {
    name = "husayni",
    version = "1.00",
    comment = "Goodies that complement the Husayni font by Idris Samawi Hamid.",
    author = "Idris Samawi Hamid and Hans Hagen",
    featuresets = { -- here we don't have references to featuresets
        default = {
            default,
        },
        minimal_stretching = {
            default, js11 = yes, js03 = yes,
        },
        medium_stretching = {
            default, js12=yes, js05=yes,
        },
        maximal_stretching= {
            default, js13 = yes, js05 = yes, js09 = yes,
        },
        wide_all = {
            default, js11 = yes, js12 = yes, js13 = yes, js05 = yes, js09 = yes,
        },
        shrink = {
            default, flts = yes, js17 = yes, ss05 = yes, ss11 = yes, ss06 = yes, ss09 = yes,
        },
    },
    solutions = { -- here we have references to featuresets, so we use strings!
        experimental = {
            less = {
                "shrink", -- we need an extra one
            },
            more = {
                "minimal_stretching", "medium_stretching", "maximal_stretching", "wide_all"
            },
        },
    },
    stylistics = {
        ss01 = "Allah, Muhammad",
        ss02 = "ss01 + Allah_final",
        ss03 = "level-1 stack over Jiim, initial entry only",
        ss04 = "level-1 stack over Jiim, initial/medial entry",
        ss05 = "multi-level Jiim stacking, initial/medial entry",
        ss06 = "aesthetic Faa/Qaaf for FJ_mm, FJ_mf connection",
        ss07 = "initial-entry stacking over Haa",
        ss08 = "initial/medial stacking over Haa, minus HM_mf strings",
        ss09 = "initial/medial Haa stacking plus HM_mf strings",
        ss10 = "basic dipped Miim, initial-entry B_S-stack over Miim",
        ss11 = "full dipped Miim, initial-entry B_S-stack over Miim",
        ss12 = "XBM_im initial-medial entry B_S-stack over Miim",
        ss13 = "full initial-medial entry B_S-stacked Miim",
        ss14 = "initial entry, stacked Laam on Miim",
        ss15 = "full stacked Laam-on-Miim",
        ss16 = "initial entry, stacked Ayn-on-Miim",
        ss17 = "full stacked Ayn-on-Miim",
        ss18 = "LMJ_im already contained in ss03--05, may remove",
        ss19 = "LM_im",
        ss20 = "KLM_m, sloped Miim",
        ss21 = "KLM_i_mm/LM_mm, sloped Miim",
        ss22 = "filled sloped Miim",
        ss23 = "LM_mm, non-sloped Miim",
        ss24 = "BR_i_mf, BN_i_mf",
        ss25 = "basic LH_im might merge with ss24",
        ss26 = "full Yaa.final special strings: BY_if, BY_mf, LY_mf",
        ss27 = "basic thin Miim.final",
        ss28 = "full thin Miim.final to be moved to jsnn",
        ss29 = "basic short Miim.final",
        ss30 = "full short Miim.final to be moved to jsnn",
        ss31 = "basic Raa.final strings: JR and SR",
        ss32 = "basic Raa.final strings: JR, SR, and BR",
        ss33 = "TtR to be moved to jsnn",
        ss34 = "AyR style also available in jsnn",
        ss35 = "full Kaaf contexts",
        ss36 = "full Laam contexts",
        ss37 = "Miim-Miim contexts",
        ss38 = "basic dipped Haa, B_SH_mm",
        ss39 = "full dipped Haa,  B_S_LH_i_mm_Mf",
        ss40 = "aesthetic dipped medial Haa",
        ss41 = "high and low Baa strings",
        ss42 = "diagonal entry",
        ss43 = "initial alternates",
        ss44 = "hooked final alif",
        ss45 = "BMA_f",
        ss46 = "BM_mm_alt, for JBM combinations",
        ss47 = "Shaddah-<kasrah> combo",
        ss48 = "Auto-sukuun",
        ss49 = "No vowels",
        ss50 = "Shaddah/MaaddahHamzah only",
        ss51 = "No Skuun",
        ss52 = "No Waslah",
        ss53 = "No Waslah",
        ss54 = "chopped finals",
        ss55 = "idgham-tanwin",
        js01 = "Raawide",
        js02 = "Yaawide",
        js03 = "Kaafwide",
        js04 = "Nuunwide",
        js05 = "Kaafwide Nuunwide Siinwide Baawide",
        js06 = "final Haa wide",
        js07 = "thin Miim",
        js08 = "short Miim",
        js09 = "wide Siin",
        js10 = "thuluth-style initial Haa, final Miim, MRw_mf",
        js11 = "level-1 stretching",
        js12 = "level-2 stretching",
        js13 = "level-3 stretching",
        js14 = "final Alif",
        js15 = "hooked final Alif",
        js16 = "aesthetic medial Faa/Qaaf",
        js17 = "fancy isol Haa after Daal, Raa, and Waaw",
        js18 = "Laamwide, alternate substitution",
        js19 = "level-4 stretching, only siin and Hhaa for basmalah",
        js20 = "level-5 stretching, only siin and Hhaa for basmalah",
        js21 = "Haa.final_alt2",
    },
    colorschemes = {
        default = {
            [1] = {
                "Onedotabove", "Onedotbelow", "Twodotsabove", "Twodotsbelow", "Threedotsabove", "Twodotsabove.vrt",
                "Twodotsbelow.vrt", "Twodotsabove.KBA", "Threedotsabove.KBA", "Threedotsbelowinv", "Hamzahabove",
                "Hamzahbelow", "MaaddahHamzah.identity", "Waslah", "Hamzah.initial_medial",
            },
            [2] = {
                "Fathah", "Dammah", "Kasrah", "FathahVertical", "DammahInverted", "KasrahVertical",
                "FathahVertical.alt1", "KasrahVertical.alt1", "FathahTanwiin", "DammahTanwiin", "KasrahTanwiin",
                "Shaddah", "Sukuun", "MaaddahHamzah", "Jazm", "Maaddah", "DammahTanwiin_alt2", "DammahTanwiin_alt1",
                "FathahTanwiin_alt1",  "KasrahTanwiin_alt1", "Fathah.mkmk", "Dammah.mkmk", "Kasrah.mkmk",
                "FathahVertical.mkmk", "DammahInverted.mkmk", "KasrahVertical.mkmk", "FathahTanwiin.mkmk",
                "DammahTanwiin.mkmk", "KasrahTanwiin.mkmk", "DammahTanwiin_alt1.mkmk", "Waawsmall", "Yaasmall",
                "FathahVertical.alt2", "Waawsmall.isol", "Yaasmall.isol", "FathahVertical.isol", "Hamzah",
                "Shaddah.lillaah", "FathahVertical.alt1_mkmk", "Sifr.empty", "Maaddah.small", "FathahVertical.alt2",
                "Waawsmall.isol", "Yaasmall.isol", "FathahTanwiin.alt1_mkmk", "KasrahTanwiin.alt1_mkmk",
            },
            [3] = {
                "Ttaa.waqf", "SsLY.waqf", "QLY.waqf", "Miim.waqf", "LA.waqf", "Jiim.waqf", "Threedotsabove.waqf",
                "Siin.waqf", "Ssaad.waqf", "Qaaf.waqf", "SsL.waqf", "QF.waqf", "SKTH.waqf", "WQFH.waqf",
                "Kaaf.waqf", "Ayn.ruku", "Miim.nuun_high", "Siin.Ssaad", "Nuunsmall", "emptydot_low",
                "emptydot_high", "Sifr.fill", "Miim.nuun_low", "Nuun.tanwiin",
            },
            [4] = {
                "ZeroArabic.ayah", "OneArabic.ayah", "TwoArabic.ayah", "ThreeArabic.ayah", "FourArabic.ayah",
                "FiveArabic.ayah", "SixArabic.ayah", "SevenArabic.ayah", "EightArabic.ayah", "NineArabic.ayah",
                "FourFarsi.ayah", "FiveFarsi.ayah", "SixFarsi.ayah", "FourFarsi.urdu_ayah", "SevenFarsi.urdu_ayah",
                "ZeroArabic.ayah_small", "OneArabic.ayah_small", "TwoArabic.ayah_small", "ThreeArabic.ayah_small",
                "FourArabic.ayah.001", "FiveArabic.ayah_small", "SixArabic.ayah_small", "SevenArabic.ayah_small",
                "EightArabic.ayah_small", "NineArabic.ayah_small",
            },
            [5] = {
                "Ayah", "Ayah.alt1", "Ayah.alt2", "Ayah.alt3", "Ayah2",
            }
        }
    }
}
