I am having an issue with Arabic Font Ligatures showing discrepancy between ConTeXt and XeLateX, when using the same font namely Scheherazade. The issue is not present when using XeLateX but only appears in ConTeXt.
Here is my original question Reference Question, the solution to that question was provided by Paolo Brasolin
The issue is with all words which contain the letters " الا "
Here is the MWE:
\enableregime[utf]
\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-Regular] [file:Scheherazade-Regular.ttf] [features=arabic]
\definefontsynonym [Arabic-Bold] [file:Scheherazade-Bold.ttf] [features=arabic]
\stoptypescript
\starttypescript [serif] [arabic] [name]
\usetypescript[serif][fallback]
\definefontsynonym [Serif] [Arabic-Regular] [features=arabic]
\definefontsynonym [SerifBold] [Arabic-Bold] [features=arabic]
\stoptypescript
\starttypescript [Arabic]
\definetypeface [Arabic] [rm] [serif] [arabic] [default]
\stoptypescript
\def\ArabicGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\ArabicParDir {\textdir TRT\pardir TRT}
\def\ArabicTextDir {\textdir TRT}
\define\setarabic
{\ArabicGlobalDir%
\usetypescript[Arabic]%
\setupbodyfont[Arabic,20pt]}
\definestartstop
[arabicpar]
[commands=\Arabic\ArabicParDir]
\define[1]\RT
{{\Arabic\ArabicTextDir#1}}
\mainlanguage[arabic]
\pagedir TRT
\bodydir TRT
\pardir TRT
\textdir TRT
\setuppagenumbering[alternative=doublesided]
\setuppapersize[A4]
\setuplayout[
grid=min,
backspace=50mm, width=130mm,
topspace=33mm, height=210mm,
header=0mm, footer=0mm,
]
\showgrid
\setupbodyfont[Arabic,24pt]
\setupinterlinespace[line=42pt]
\setupheads[number=no]
\setuphead[chapter][style=\bfd,before=,after=\blank,alternative=middle,grid=both]
\setuphead[section][style=\bfc,before=\blank,after=,grid=both]
\starttext
\chapter{كِتَاب الطَّهَارَةِ}
اَلْمِيَاهُ ثَلَاثَةٌ\\
اَلْأَوَّلُ: طَهُورٌ وَهُوَ اَلْبَاقِي عَلَى خِلْقَتِهِ وَمِنْهُ مَكْرُوهٌ كَمُتَغَيِّرٍ بِغَيْرِ مُمَازِجٍ وَمُحَرَّمٌ لَا يَرْفَعُ اَلْحَدَثَ وَيُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمَغْصُوب وَغَيْرُ بِئْرِ النَّاقَةِ مِنْ ثَمُودَ .\\
اَلثَّانِي: طَاهِرٌ لَا يَرْفَعُ اَلْحَدَثَ وَلَا يُزِيلُ اَلْخَبَثَ وَهُوَ اَلْمُتَغَيِّرُ بِمُمَازِجٍ طَاهِر وَمِنْهُ يَسِيرٌ مُسْتَعْمَلٌ فِي رَفْعِ حَدَثٍ .\\
اَلثَّالِثُ: نَجِسٌ يَحْرُمُ اِسْتِعْمَالُهُ مُطْلَقًا وَهُوَ مَا تَغَيَّرَ بِنَجَاسَةٍ فِي غَيْرِ مَحِلِّ تَطْهِيرٍ أَوْ لَاقَاهَا فِي غَيْرِهِ وَهُوَ يَسِيرٌ وَالْجَارِي كَالرَّاكِدِ وَالْكَثِيرُ قُلَّتَانِ وَهُمَا مِائَةُ رِطْلٍ وَسَبْعَةُ أَرْطَالٍ وَسُبْعُ رِطْلٍ بِالدِّمَشْقِيِّ وَالْيَسِيرُ مَا دُونَهُمَ .
\section{طَهَارَةُ اَلْآنِيَةِ}
كُلُّ إِنَاءٍ طَاهِرٍ يُبَاحُ اِتِّخَاذُهُ وَاسْتِعْمَالُهُ إِلَّا أَنْ يَكُونَ ذَهَبًا أَوْ فِضَّةً أَوْ مُضَبَّبًا بِأَحَدِهِمَا لَكِنْ تُبَاحُ ضَبَّةٌ يَسِيرَةٌ مِنْ فِضَّةٍ لِحَاجَةٍ وَمَا لَمْ تُعْلَمْ نَجَاسَتُهُ مِنْ آنِيَةِ كُفَّارٍ وَثِيَابُهُمْ طَاهِرَةٌ وَلَا يَطْهُرُ جِلْدُ مَيِّتَةٍ بِدِبَاغٍ وَكُلُّ أَجْزَائِهَا نَجِسَةٌ إِلَّا شَعْرًا وَنَحْوَهُ وَالْمُنْفَصِلُ مِنْ حَيٍّ كَمَيْتَتِهِ .
\section{اَلِاسْتِنْجَاءُ وَالِاسْتِجْمَارُ}
اَلِاسْتِنْجَاءُ وَاجِبٌ مِنْ كُلِّ خَارِجٍ إِلَّا اَلرِّيحَ وَالطَّاهِرَ وَغَيْرَ اَلْمُلَوَّث وَسُنَّ عِنْدَ دُخُولِ خَلَاءٍ قَوْلُ : بِسْمِ اَللَّهِ اَللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ اَلْخُبُثِ وَالْخَبَائِثِ وَبَعْدَ خُرُوجٍ مِنْهُ : غُفْرَانَكَ، اَلْحَمْدُ لِلَّهِ اَلَّذِي أَذْهَبَ عَنِّي اَلْأَذَى وَعَافَانِي.\\
\stoptext
Here are the screenshots with the ligature issue highlighted in red.
As you can notice in the 2nd section title, if we remove the diacritical mark before the letter " ل " , then it shows the correct ligatures. But when we place a diacritic mark before " ل ", the issue appears.
Does anyone have any experience dealing with these types of issues.


XeLaTeX. A more appropriate title would be ConTeXt missing arabic ligature because of diacritic. The essence of the problem is you havealif+lem+sukun+alifand the result is missing the mandatory ligature between the last two letters, so it's typeset with the usual joins. This does not happen withoutsukun. Probably the solution is to define a new font feature having the correct glyph substitution for the three characters in a lookup table, as shown here. – Paolo Brasolin Jan 03 '16 at 18:57