Description: Currently, LO applies justification by adding "ـ" U+0640 ARABIC TATWEEL between letters. However, there is another way of applying Kashida by stretching specific letter within words. 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 are attached. Examples are taken from KFGQPC print of Quran <https://books.islamway.net/1/01_Mushaf_AlMadinah_L_549.pdf>. Steps to Reproduce: . Actual Results: . Expected Results: . Reproducible: Always User Profile Reset: No Additional Info: .
Created attachment 198335 [details] Examples
I would guess this would really depend on whether the font rendering mechanisms underlying LibreOffice support this extension of letter forms themselves - and whether the font formats, and fonts, support this. I am not at all sure this is the case.
In my opinion, bug 116969 also requests this type of justification. I'm therefore marking this bug a duplicate. (In reply to Eyal Rozenberg from comment #2) > I would guess this would really depend on whether the font rendering > mechanisms underlying LibreOffice support this extension of letter forms > themselves - and whether the font formats, and fonts, support this. I am not > at all sure this is the case. In theory the font formats do support this, but few programs seem capable of using those features so I'm not sure how many fonts provide them. HarfBuzz developers are working in this area. There's an experimental hb_shape_justify API, but I haven't had a chance to test it yet. *** This bug has been marked as a duplicate of bug 116969 ***
(In reply to Eyal Rozenberg from comment #2) > depends on whether the font rendering mechanisms support this OpenType supports this. It's `jalts` (Justification Alternates). See this Tex SE discussion: https://tex.stackexchange.com/questions/595220/