3 ms·
I honestly think right-to-left text rendering should never have been a thing. Text should always be stored left-to-right and right-to-left languages should be s
by Asooka 2y ago
I honestly think right-to-left text rendering should never have been a thing. Text should always be stored left-to-right and right-to-left languages should be supported by the text editor itself. That is, when the user enters a character from an RTL script, the cursor should simply move left instead of right. Then all the problems with selection etc. simply don't exist. You may have different problems with e.g. pasting mixed content, but moving the complexity to the text editor (which has to handle it anyway) and not having it in the text rendering engine seems like it would have been the better call. I can see how some might object that the indices of the characters don't correspond to the way people think, but honestly - if you're someone who needs to care about indices of characters in arrays, you would probably appreciate the system being overall simpler even if you have to iterate backwards sometimes.
- crazygringo 2y ago> Text should always be stored left-to-right and right-to-left languages should be supported by the text editor itself. That only works if you're dealing with a single line. Once you're dealing with paragraphs (lines that wrap) your model won't work. Much less with entire documents.