Open Bug 842121 Opened 13 years ago Updated 4 years ago

Problems displaying Arabic and Iranian characters (RTL) after LibreOffice HTML export

Categories

(Core :: Graphics: Text, defect)

19 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: isaric.co, Unassigned)

References

()

Details

(Keywords: rtl)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130207202654 Steps to reproduce: Hello, I am French and I do not know whether this bug already listed Initially, I thought I had a problem with LibreOffice export html https://bugs.freedesktop.org/show_bug.cgi?id=59704 It turns out that this is a problem firefox http://isaric.cof.free.fr/LibO/Test_Second% 20Part% 20in% 20Persian-4001.html (timing delay line + end point of the second line of the sentence in Iran after conversion is found at the beginning of the second line it should not because the end of the line is to the left.) apparently with the result obtained with IE9 https://bugs.freedesktop.org/attachment.cgi?id=73682 Thank you in advance
Erreur url : It turns out that this is a problem firefox http://isaric.cof.free.fr/LibO/Test_Second%20part%20in%20Persian-4001.html
Component: Untriaged → Graphics: Text
Keywords: rtl
Product: Firefox → Core
Summary: Problems displaying Arabic characters / Iranian → Problems displaying Arabic and Iranian characters (RTL) after LibreOffice HTML export
The same problem with 20.0
AFAICT, I don't think this is a Firefox bug. The "problem" is that the paragraph in question is being laid out with left-to-right directionality, even though it happens to contain Persian text. Hence, the paragraph indent appears at the left-hand end of the first line; and the last (partial) line is aligned to the left. This is correct layout for a left-to-right paragraph, and is not changed by the fact that some of the words - even as many as 100% of them! - in the paragraph happen to be in a right-to-left script. Note that there's nothing in the HTML suggesting that this paragraph should in fact be laid out in right-to-left mode. The <body> element is explicitly tagged with dir="ltr"; this is inherited by all the paragraphs within it, as they do not override it. The layout would be "fixed" if that Persian paragraph were tagged with dir="rtl" in the source, or if it included direction:rtl in its CSS styling. But apparently the LibreOffice export failed to do either of those things, even though the paragraph was presumably presented in RTL layout within LO. Another possibility would be to tag the paragraphs with dir="auto", which would make them infer directionality from the text content. This would have provided the desired result here, though it's possible that it might fail in more complex cases where the paragraph contains a -mixture- of LTR and RTL text. It looks as though IE must be doing something like dir="auto" here, even though the document is explicitly marked (on the <body> element) as dir="ltr". While this is giving the desired result in this particular case, I don't think it is spec-conformant; the real problem is the deficiency in LO's export. (cc-ing smontagu for confirmation of my understanding here, as he knows more about these properties.)
I confirm what Jonathan says in comment 4. Meanwhile there is an interesting response in https://bugs.freedesktop.org/show_bug.cgi?id=59704#c7: 'It has "writing-mode:rl-tb" CSS attribute which supersedes "direction:rtl". Firefox not supporting is a problem with Firefox.' I don't think it's accurate to say that writing-mode:rl-tb supersedes direction:rtl. It's true that writing-mode:lr-tb and rl-tb appeared in an earlier version of CSS3 Text (http://www.w3.org/TR/2003/CR-css3-text-20030514/), but they are no longer in the current version (http://www.w3.org/TR/css3-writing-modes/), where writing-mode only specifies the block flow direction and not the inline progression direction. As far as I know, the old syntax of writing-mode has only ever been supported by IE. I would be happy if someone could copy this comment into the LO bug report, since I don't have a bugzilla account at freedesktop.org
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: