Description: Depending on how vowel markings or dots are placed on Syriac consonants, the rule for counting where to insert the kashida(0640) character seems to be counting by any kind of character instead of by Syriac consonants. The rule is that we calculate the mid-point of a word, and search from back to the middle, and then from front to middle to insert the character based on connecting rules. As it is now, the middle is just calculated by dividing by two of all character types, instead of counting the middle of Syriac consonants. Another issue is that it should count from back to middle inclusive before it goes to front to middle exclusive. In a situation of an even-numbered set of consonants, the middle includes what would be between the two middle consonants. If the above is not possible, or as a temporary fix, it would be sufficient in the short term to simply search from back to front, and not calculate the midpoint. Steps to Reproduce: 1. Paste in or type in a Syriac text. 2. Justify the text. 3. Set Right-to-Left (need complex layouts enabled). 4. Put line-breaks to test the justification. 5. Add and remove dot or vowel markings to see the kashida shift to different positions Actual Results: The kashida moves to different parts of the word as dots and vowel markings are changed. Expected Results: The middle of the word should be calculated by only adding or removing Syriac consonants, and not by adding other Syriac markings such as dots or vowels. Reproducible: Always User Profile Reset: No Additional Info: This is a follow up to Bug 140767. I'm no C++ programmer but I believe the issue may be at: i18util/source/utility/kashida.cxx, line 351. The syriac consonants are: 0710, 0712 to 072F, and 074D-F The vowel and dot markings are: 0730-074A, and 0711 Version: 25.8.1.1 (X86_64) / LibreOffice Community Build ID: 580(Build:1) CPU threads: 16; OS: Linux 6.12; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US 25.8.1-3 Calc: threaded Testing text: These are the same words repeated, with and without different sets of vowels and markings, they should insert kashida the same way regardless of the markings. Use shift+enter to make new line to force justification lines to show. ܠܠܝܐ ܠܺܠܝܐ ܠܺܠܝܳܐ ܟܬܒܐ ܟܬܳܒܳܐ ܟܬ̥ܳܒܳܐ ܟܬܳܒܐ ܚܒܝܒܐ ܚܰܒܺܝܒܳܐ ܚܰܒܺ̊ܝܒ̥ܳܐ ܚܒܝܒܳܐ ܐܒܘܢ ܐܰܒ̥ܽܘܢ ܡܶܢ ܡܰܢ ܡܢ ܡܐܐ ܡܳܐܐ
Confirmed, this algorithm needs adjustment.