[alreq] Single-letter Kashida (#281)

avidseeker has just created a new issue for https://github.com/w3c/alreq:

== Single-letter Kashida ==
Currently, applying Kashida is by adding "ـ" U+0640 ARABIC TATWEEL _between_ letters. However, a more elegant way is by stretching a specific letter within the word. This method is popular with old scriptures, calligraphy, and handwritten messages.

Here is a rough estimate of the algorithm for the improved Kashida. 
- Start with the last word in a line, and apply stretching to the final letter in that word.
- However, if the letter is not "stretch-able" (e.g: Arabic Meem م), then look for middle-form Kaaf (ك) and stretch that
- If there is no Kaaf, apply the fallback Kashida by adding TATWEEL between letters.
- TATWEEL is usually added to the last two connected letters. These letters are not necessarily the last letters of the word since they could be in isolated form (e.g: "الماء" --> "المـــاء") Notice that "اء" are isolated (they cannot connect).
- Stretch-able letter forms are: كـ, ـن, ن, ت, ـت, س, ـس, ص, ـص, ـى, ى, ف, ـف (where س and ت also their dotted variants e.g: ش and ث). Also have a look on https://en.wikipedia.org/wiki/Arabic_alphabet#Table_of_basic_letters for reference.

Examples: (Taken from [KFGQPC print](https://books.islamway.net/1/01_Mushaf_AlMadinah_L_549.pdf) of Quran). 

![kaaf-alif-maqsura-kashida](https://github.com/user-attachments/assets/93d1e949-da55-4b1a-9701-eb18a53c50d5)

Single-letter Kashida applied to initial form "كـ" and final "ـى"

![kaaf-baa-kashida](https://github.com/user-attachments/assets/9a8f36c3-7555-4b35-a5a4-9f9da6baf525)

Applied to "ـكـ" and "ـب" in  "الكتب"

![kaaf-faa-kashida](https://github.com/user-attachments/assets/ac1b8e45-0091-4aaa-ab30-0fc7183e57d6)

Applied to "كـ" and "ـف" in "كيف"

![kaf-kashida](https://github.com/user-attachments/assets/97360c51-15a6-403f-974d-0c6ba51e7876)

Applied to "ـكـ"

![regular-kashida](https://github.com/user-attachments/assets/d2831103-02b3-4734-9562-84614c425daa)

Applied to last two connected letters in "الناس" (notice that س and ا are not connected) and last two connected letters in "عظيم".

![image](https://github.com/user-attachments/assets/1a0cadd5-be04-4554-adde-bd8f809e7e7a)

Here is an example for a line. The algorithm works by

1. Choose the last word in the line (الذين). Apply stretching to the last letter "ن".
2. Next, to fill more space, look for a initial form "كـ" or medial form "ـكـ", which is in this case "شاكر" then stretch it.
3. Next, to fill more space, look in the list for stretch-able letters, and stretch "ن" in "فإن".
4. Done. Notice how the priority goes for single-letters rather than filling in between letters. This is a more beautiful usage of Arabic calligraphy.

Please view or discuss this issue at https://github.com/w3c/alreq/issues/281 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 October 2024 18:08:02 UTC