Scribus Shaping
Behold:

Actually .. the code is very crude. This is done using HarfBuzz, but not to its fullest, and there are lots of holes that I still don’t know how to fill, and a bunch of work-arounds that shouldn’t really happen.
Here is one problem for instance: when a sentence contains a lam-alef (ligature), the last (x) character in its run get repeated:

Quick Update:
I think I managed to fix the issues with runs containing lam-alef, here see for yourself:
