bonjour
j'ai deux ligatures arabes
première ligature composée de deux caractères
-premier caractère : caractère init
-deuxième caractère : caractère médi
par exemple (كت)
deuxième ligature composée aussi de deux caractères
-premier caractère : caractère médi (identique au deuxième caractère de la première ligature)
-deuxième caractère : caractère finale
par exemple (تا)
et je veux lorsque j'écris le mot(كتا) le programme garde seulement le premier caractère de la première ligature et l'ajoute au deuxième ligature
et merci
English Translation
Hello
I have two Arab ligatures
first ligature composed of two characters
-first character: init character
-second character: medium character
for example (كت)
second ligature also composed of two characters
-first character: medium character (identical to the second character of the first ligature)
-second character: final character
for example (تا)
and I want when I write the word (كتا) the program only keeps the first character of the first ligature and adds it to the second ligature
and thank you
caractères arabes
caractères arabes
Last edited by Bhikkhu Pesala on Sat Oct 01, 2022 11:50 am, edited 1 time in total.
Reason: Added English translation
Reason: Added English translation
-
- Moderator
- Posts: 11227
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: caractères arabes
It can be done with help of a contextual substitution lookup. See this sample feature code:
Code: Select all
languagesystem arab dflt; # Arabic default
lookup Ligature1 { # GSUB lookup type Ligature
sub kaf-arab.init teh-arab.medi by kafteh-arab.init;
} Ligature1;
feature init { # Initial Forms
sub kaf-arab by kaf-arab.init;
} init;
feature medi { # Medial Forms
sub teh-arab by teh-arab.medi;
} medi;
feature fina { # Terminal Forms
sub alef-arab by alef-arab.fina;
sub teh-arab by teh-arab.fina;
} fina;
feature clig { # Contextual Ligatures
ignore sub kaf-arab.init' teh-arab.medi' alef-arab.fina;
sub kaf-arab.init' lookup Ligature1 teh-arab.medi';
} clig;
feature liga { # Standard Ligatures
sub teh-arab.medi alef-arab.fina by tehalef-arab.fina;
} liga;
Re: caractères arabes
Thanks Erwin Denissen it works perfectly.