ok, this looks a bit better. I now do it only on operations and stuff the result into a HStack:
HStack {
ForEach(elements) { item in
textFromElement(element: item).flipsForRightToLeftLayoutDirection(item.type == .OPERATION)
}
}
}
The result looks a bit nearer to what I want:
Now I have to make a distinction between operators that have to be mirrored (parentheses, arithmetic operatiors...) and operators that show arabic text and hve to stay how they are....
I am not sure if that really is the best solution, but it may produce some acceptable result in the end.