
\startluacode
function palapatch (data,filename)
     if data.version == "1.40" then
        logs.report("load otf", "patching smallcaps i")
        data.glyphs[0x92].lookups["ss_latn_l_14_s"][1].specification.variant="a.scturkish"
        data.glyphs[0x492].name = "a.scturkish"
     end
end

fonts.otf.enhancers.patches["^pala"] = palapatch
\stopluacode


\definefontfeature[palatinolt-default][script=latn,kern=yes,liga=yes,trep=yes,tlig=yes,protrusion=quality]
\definefontfeature[palatinolt-smcp][script=latn,kern=yes,liga=yes,trep=yes,tlig=yes,protrusion=quality,smcp=yes,onum=yes]
\definefontfeature[palatinolt-sups][mode=node,script=latn,kern=yes,liga=yes,trep=yes,tlig=yes,protrusion=quality,sups=yes]

\starttypescript[serif][palatinolt][name]
\usetypescript[serif][fallback]
\definefontsynonym[Serif][file:pala.ttf][features=palatinolt-default]
\definefontsynonym[SerifBold][file:palab.ttf][features=palatinolt-default]
\definefontsynonym[SerifItalic][file:palai.ttf][features=palatinolt-default]
\definefontsynonym[SerifBoldItalic][file:palabi.ttf][features=palatinolt-default]
\definefontsynonym[SerifCaps][file:pala.ttf][features=palatinolt-smcp]
\stoptypescript

\definetypeface[palatinolt][rm][serif][palatinolt][default]

\setupbodyfont[palatinolt]
\enableprotruding\setuppagenumbering[location=]

\starttext
{\sc \input knuth }
\stoptext 
