% engine=luatex 

\mainlanguage[arabic]

% Font
\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabic]
 \definefontsynonym [Arabic-Light]       [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold]        [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Italic]      [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold-Italic] [name:arabtype] [features=arabic]
 \stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]           [Arabic-Light]       [features=arabic]
 \definefontsynonym [SerifItalic]     [Arabic-Italic]      [features=arabic]
 \definefontsynonym [SerifBold]       [Arabic-Bold]        [features=arabic]
 \definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic] [features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 

\usetypescript[Arabic]
\setupbodyfont[Arabic,20pt]

% direction
\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT

% links
\setupinteraction
  [state=start,
   color=green,
   style=bold]

\setcharactermirroring[1]

\starttext
\startstandardmakeup
  \midaligned{كيف تكتب عربي في كنتكست}
  \midaligned{كتبه}
  \midaligned{خالد حسني}
\stopstandardmakeup
%\completecontent
\chapter{مقدمة}
الكتابة العربية من اليمين لليسار

English text is mirrored

\stoptext
