I'd assume that the text is modified in units more complex than substrings and whitespace splitting?
I'd assume that the text is modified in units more complex than substrings and whitespace splitting?
Correct. Each letter in Arabic can have up to four shapes depending on its position in a word: initial, medial, final and isolated[0].
Also note that the sample text on the left contains Arabic diacritics[1]. These are usually omitted by native speakers/writers since they can be inferred from the context (the only exception I can think of is religious scripture), but they certainly add to the complexity of it all.
Needless to say, creating an Arabic mono-font is quite challenging. Kudos to the designer.
[0] https://en.wikipedia.org/wiki/Arabic_alphabet#Letter_forms
This is the main problem you see sometimes in movies where they try to show something in Arabic and they get the rendering wrong. They probably get each letter on its own and try to construct the words like that, where the letters do not join and the whole thing looks like a mess.