HOST-Oman/scribus

in the PP and styles, do we really LTR/RTL buttons?

Closed this issue · 6 comments

aoloe commented

in the PP and the paragraph style, de we now have a LTR / RTL buttons... but shouldn't the text direction be a property of the language?
are there language that can be written LTR and RTL?

if we need a default direction for the paragraph, we can use the language defined in the style applied to the paragraph.

aoloe commented

btw, this is something that could be interesting...

"""
Languages don't have a direction. Scripts have a writing direction, and so languages written in a particular script, will be written with the direction of that script.

Languages can be written in more than one script. For example, Azeri can be written in any of the Latin, Cyrillic, or Arabic scripts. When written in Latin or Cyrillic scripts, Azeri is written left-to-right (LTR). When written in the Arabic script, it is written right-to-left.
"""

http://www.i18nguy.com/temp/rtl.html

it seems that the language is not enough, to define how scribus should behave (not only for text direction but also for hyphenation and co.)

i have no solutions... only a few questions...

This is the paragraph direction not the text direction.

The Unicode bidirectional text algorithm determines what part of text should be right to left of left to right, but there is also the overall directionality of the paragraph i.e. answering the question: is this a right-to-left paragraph with possibly some left-to-right text or is it the other way around? There is no reliable automatic way to detect this since it really depends on the user intention and not the text itself.

There are heuristics to determine the paragraph direction and is usually used by applications like text editors or GUI toolkit where the text needs to be rendered with no user interaction, but when user interaction with the text is the norm e.g. DTP, office applications, browsers (with the user here being the page author), then explicitly indicating the paragraph direction is the preferred way:
http://www.unicode.org/reports/tr9/#The_Paragraph_Level
http://www.unicode.org/reports/tr9/#HL1

aoloe commented

very interesting read.

one thing that worries me, is that the two buttons are rather prominent, but a single user is very unlikely to ever click on them: most people will write in LTR or RTL.
instead of thinking about hiding them a bit more, i wonder if they are really needed.
your thoughts seems to confirm that they are, but i cannot find a confirmation in the links you provide.

when setting the paragraph language, one already chooses its text direction, or not?
(i've only found language+scripts that can be written both LTR or TD, but not both RTL or LTR...

basically, you don't have to convince me that it's a good thing to have those buttons. if you think they have to be there, i'm comfortable with it.

but i wanted to raise the question: if we can suppress two buttons and keep the same functionality, the UI will be a little be better.
otherwise, everybody will be aware that scribus is a good^w^w the best tool for both LTR and RTL :-)

Almost any one writing right-to-left text will need this button, without it punctuation and other neutral characters will be placed wrongly, and intervening left-to-right text will have unexpected effect on the order of the text (unexpected in case the paragraph was meant to be right-to-left, but expected if it was meant to be left-to-right). This is also how pretty much any application with right-to-left support presents this in its UI (InDesign, MS Office, LibreOffice, to name a few) so this what a right-to-left user would expect.

Tying the paragraph direction with the text language is unusual and not the right place either since language applies to individual characters (CharStyle is Scribus speak) as you can mix languages in a single paragraph, while paragraph direction applies to the whole paragraph (ParagraphStyle). The two are really independent.

Also, to know the default direction you need a full locale, at least the script, and Scribus only stores the language. There are languages written in different scripts and there are even scripts written in different direction (though all such scripts are ancient ones), so we would be just complicating things by grouping independent concepts together. But even if one manages to get the direction from the language, what happens to paragraphs mixing several languages?

aoloe commented

Then we are back to applying heuristics, which is that those buttons are there to avoid. Since we are talking about typesetting here, heuristics is the last thing we want to do, otherwise Scribus would have used Pango in 2003 and we wouldn’t even be speaking now :)