------ Original Message ------
From "Hans Hagen" <j.hagen@xs4all.nl>
To "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Date 5/9/2024 6:29:40 AM
Subject [NTG-context] Re: rendering arabic diacritics

** Caution: EXTERNAL Sender **
 
On 5/9/2024 2:17 PM, Hamid,Idris wrote:
Hi Seyal,
 
See below:
 
------ Original Message ------
Date 5/9/2024 3:31:45 AM
Subject [NTG-context] Re: rendering arabic diacritics
 
** Caution: EXTERNAL Sender **
On 5/9/2024 10:03 AM, seyal.zavira@gmail.com
Hi all,
when i want to use the linked font for arabic texts it doesn't render
diacritics properly
i doesn't have problem with this font in inkscape or libreoffice
what featureset should i apply?
font link:
this is my MWE:
\definefontfeature [arabis]
[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]
\definefont [Ahang] [file:Ahang-Regular.otf*arabis at 18pt]
\setupalign[r2l]
\starttext
{\Ahang تَشْكِيل كَسْرَة}
\stoptext
\definefont [Ahang] [file:Ahang-Regular.otf*arabic at 18pt]
but there is an issue with widths, ill send you a patch to test
 
The provided "*arabic" featureset should suffice for this font. Also
TEXpage is useful for this kind of MWE:
 
\definefont [Ahang] [file:Ahang-Regular.otf*arabic at 18pt]
\setupalign[r2l]
\startTEXpage[offset=1em]
{\Ahang تَشْكِيل كَسْرَة}
\stopTEXpage
 
In prehistoric ConTeXt version
 
2023.09.26 18:19
 
the diacritics look fine in both ConTeXt and unicode editor MS Notepad.
 
So if there is something wrong, it must be in a more recent version.
 
For comparison: Before applying Hans' patch, could you kindly send your
pdf of the MWE that shows the error? Mine is attached.
Ahang-Regular has no width settings for the marks so we need to zero
them. Tahrir_Regular has widths but these we explictly need to zero with
a pseudo feature then. (What are the assumptions when we do arabic? That
marks are to have zero width?)

Yes, marks should have zero-width but Uniscribe (and Harbuzz?/its successor?) provide support for legacy fonts with non-zero width.

But sometimes font designers imitate legacy behavior.. 

So it used to be often the case that a font with diacritics that worked in Uniscribe etc. (e.g., Deja Vu Arabic) would show marks with widths in ConTeXt.

In order to be more helpful, I should update to the latest beta, run some tests, and get current on the status of these matters..

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80523