HOST-Oman/scribus

when shifting to RTL mode cursor doesn't shift position unless text is entered

Opened this issue · 8 comments

  1. Open text box
  2. press RTL button
    Result: Cursor stays in the LTR position
  3. enter any text
    Result: Cursor shift to RTL

But what do you expect @luzpaz ?
RTL is not "Align Right".

@munzirtaha the expectation is that the cursor act like it is about to type letter from right to left
You can see this behaviour in LibreOffice, MS Word and other applications.
How to view behaviour in LibreOffice:

  1. Enable CTL support using Tools - Options' - Language Settings - Languages'. link
  2. Activate RTL using Ctrl+Shift+D or Ctrl+Right Shift - switch to right-to-left text entry link

I am aware of LibreOffice behavior but that doesn't make it correct. What if some one wants his text to be RTL but "Align Left"?
My point is there is nothing wrong in the correct behavior but if we want to pretend reading the mind of the user based on the probability theory, then I suggest to make scribus choose the direction automatically based on the first letter typed with no need to press the direction or align buttons manually (like Qt). And if they user doesn't like our guess, then he can use either the direction or align buttons to set it otherwise.

What if some one wants his text to be RTL but "Align Left"?

@munzirtaha interesting perspective. Didn't think about it that way. As a person who reads and writes RTL script, I haven't thought twice about that because 'align left' text for an RTL script has very low probability of being a default.

This is also related to a bug I filed a while ago and forgot about till now: #13685

Yes, that bug is a valid one, cursor should be moved based on alignment not directionality. If we have to set an auto-alignment based on written text, I suggest you close this one and add a new bug for it

@munzirtaha Another thought came up for me is how would you indicate on the GUI that text direction has changed after a keyboard shortcut has been triggered and say...you didn't have the text palette open where the directionality buttons were visible ?

The cursor shape should reflect that so it points to the left like the number 7 in case of RTL and look like Capital I in case of English. This is the legacy way of doing it in most applications.