Closed Bug 256408 Opened 21 years ago Closed 21 years ago

Layout ignores explicit CSS direction and chooses direction based on character range

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: neady, Assigned: mkaply)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9 Characters from certain ranges appear to always be layed out flowing in a certain direction, irrespective of the CSS2 direction flag. For example, characters in the ASCII range are always layed out left-to-right, even if their CSS says { direction: rtl; }, and characters in the Hebrew unicode range (0590-05FF) seem to always be layed out right-to-left, even if their CSS says { direction: ltr; }. These directions are excellent defaults if the direction is not specified in CSS, but an explicit CSS direction should be followed. Reproducible: Always Steps to Reproduce: 1. Load a page with CSS that directs the text flow opposite what would normally be expected Actual Results: Text flow is determined by character range only Expected Results: Text flow should follow what CSS says, if the CSS actually says, or guess based on character range otherwise. One reason a page author might want to direct text written in a normally-rtl script (such as Hebrew) to run left-to-right would be pasting in legacy text that was originally typed in using software that did not support rtl flow. One reason a page author might want to direct text apparently written in Latin characters to flow right-to-left would be for using a transliterative font, such as TekniaHebrew or cetera. These are both probably minority cases (especially the latter, and especially on the web), but I've run into the latter case recently and in the course of my debugging discovered the former case also. It may be that the severity on this should be Enhancement, though it feels like a bug to the page author. It may also be that it should have the CSS2 keyword. And I'm not absolutely certain I've put it in the right component, but I did not see a component dedicated to CSS support. I will shortly upload a test case HTML file with embedded CSS that will demonstrate the issue.
You misunderstood the standard. The CSS 'direction' property (as well as HTML 4 DIR attribute) only defines the base writing direction of the block. For example, for Hebrew paragraphs, direction:rtl is what you want to use. If you want to override the natural direction of the characters; in other words, if you want to say "layout as I say, not as BiDi algorithm says", then in addition to 'direction', you should also set 'unicode-bidi:bidi-override'. Alternatively, you can use the HTML 4 BDO element, or Unicode Right-to-Left-Override (RLO) control character, to achieve the same result.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
verified INVALID.
Status: RESOLVED → VERIFIED
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: