[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 #2 from Addison Phillips <addison@lab126.com> ---
(In reply to Philip Jägenstedt from comment #1)
> As it stands, the cue text itself is the only thing used to determine text
> directionality.
> 
> Are &lrm; and &rlm; insufficient to help the Unicode paragraph detection
> algorithm on a per-cue level?

These are sufficient from the point of view that they set the text direction,
but they require user intervention to create and insert them. Use of the bidi
controls in this way is a serious impediment to RTL language users, since they
must generally insert the markers for every string. This also makes it more
difficult to, e.g., extract bidi text from other markup languages.

Would you find WebVTT acceptable to use if every time you entered an English or
German cue string, you also had to insert an invisible control character or its
entity just to ensure that it displayed properly?

> 
> For which kinds of captions would it be useful to a file-wide direction
> default? 

If the file is mainly in an RTL script language (such as Arabic or Hebrew),
setting a file-wide direction is the most direct means of ensuring that all of
the cues receive the correct base direction, layout, and so forth. This is much
simpler than having to laboriously set the direction of every text element. It
also sets "start" and "end" and other directionally affected presentational
elements without reference to text. Other CSS styles that are directionally
aware can also key of of the value.

> Since cues are centered by default, it will only make a difference
> if one uses align:start or align:end on any cues, but if one wants all cues
> to be right-aligned (for the odd LTR cue in otherwise RTL captions) it seems
> like using align:right would be the thing to use.

Well, no. The reason you have keywords "start" and "end" in the first place
(rather than just "left" or "right") is so that RTL language users don't have
to recreate and reset every single style to "the other side" of the display. If
the base direction is RTL then align:start does what it says it does: aligns
the text according to the starting (right) side of the display.

It is also the case that setting base text direction helps even when "start"
and "end" don't enter into the situation. The Unicode bidi algorithm needs help
to determine the base direction in many cases and the presentation of a given
cue may be wrong because the bidi algorithm hasn't been given the necessary
help. Richard provided an example in the original bug text, but there are a
myriad more where the presentation is wrong. Since most sets of cues will be in
the same language and share a direction, setting a default is very helpful in
this regard.

> 
> Bug 15024 is somewhat related, if we have a per-cue setting then a DEFAULTS
> block could be used to override it.

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

Received on Tuesday, 24 March 2015 00:59:14 UTC