[Bug 28266] [webvtt] 6.2.1 processing model handling of bidi [I18N-ISSUE-432]

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28266

--- Comment #13 from Richard Ishida <ishida@w3.org> ---
> * for the cue-specific setting, writing &lrm; and &rlm; at the beginning of the cue would be shorter than having to write direction:lrm or direction:rlm as a cue setting
>
> Is that sufficient to resolve this bug?

only if first-strong detection is used to establish the direction of the cue
text.

Basically, 
(a) setting base direction via metadata (here the STYLE setting or
direction:xxx on the cue) or 
(b) guessing base direction based on the first strong character, 
are both mutually exclusive (except for the case where the metadata is set to
auto, which explicitly indicates that first strong should be used).

take the example Philip provided:

00:00.000 --> 00:10.000
bahrain مصر kuwait

if first-strong heuristics are being used to determine the direction, then
putting &rlm; before bahrain in the source will indeed cause bahrain to appear
to the right of the other text, since the first strong character is now RTL.

if, however, the base direction is already set by metadata (eg. STYLE
direction:rtl;), the application would then ignore the first strong directional
character to determine the base direction, since the base direction is already
determined. If STYLE direction is set to ltr, therefore, bahrain will be
displayed to the left of the other text, regardless of whether there is an
&rlm; or not, because &rlm; doesn't set the base direction for a range of text.

(there are other, paired, Unicode control characters which would produce the
expected effect by setting the base direction for a range of text, but it's not
recommended to use them, especially for non-inline signals, for a variety of
reasons. I have begun writing up some notes about bidi in plain text at
http://r12a.github.io/docs/bidi-plain-text/ that are relevant to this.)

on the other hand, note that if STYLE contains, say, direction:rtl then the
only time you'd have to add direction:ltr to the cell is when you want the
ordering of directional runs or punctuation inside the cue to be different from
what would be already produced with a base direction of rtl. This is not likely
to be very frequent in monolingual content (although when needed it is
important that it should be available).

(note, btw, that i wrote direction:ltr rather than direction:lrm)

does that help?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Thursday, 25 June 2015 11:22:32 UTC