Re: text-wrap balance

> best practice in caption authoring requires the author to balence the rendered lines for better readability

Two points on this:

1. I agree that only the author can generally do this; asking the user agent to do it probably won’t work well.

2. Best practice is not just to balance, but also to take into account grammar and context, and to balance across different “cues", not just within the text visible on screen at any one moment. For example, the BBC’s guidelines on line break position<http://bbc.github.io/subtitle-guidelines/#Break-at-natural-points> are mainly linguistic, though there is some description of what to do if the two lines are very different lengths and there is usual alignment in use. Aside from this edge case, there’s no requirement merely to make lines a similar length, which is what text-wrap: balance seems to be trying to do. I’ve not seen any evidence that doing so would be helpful.

> I wonder if this would also be relevant to TTML? Would it make sense to lobby the CSS group for it?

I imagine there was debate about this feature when it was first proposed, the resolution to which was to include the feature; if we were having that debate again now I would not advocate for text-wrap: balance for this use case, because it could be fairly complex to implement and in the end, not genuinely help the user. By the same token, I would not consider it relevant to TTML.

Just for completeness, the reason for marking it as at risk now in WebVTT CR is that it is not implemented adequately.

Kind regards,

Nigel


From: Silvia Pfeiffer <silviapfeiffer1@gmail.com<mailto:silviapfeiffer1@gmail.com>>
Date: Saturday, 15 June 2019 at 14:26
To: Philippe Le Hegaret <plh@w3.org<mailto:plh@w3.org>>
Cc: Pierre-Anthony Lemieux <pal@sandflow.com<mailto:pal@sandflow.com>>, Gary Katsevman <me@gkatsev.com<mailto:me@gkatsev.com>>, Cyril Concolato <cconcolato@netflix.com<mailto:cconcolato@netflix.com>>, Nigel Megitt <nigel.megitt@bbc.co.uk<mailto:nigel.megitt@bbc.co.uk>>, TTWG <public-tt@w3.org<mailto:public-tt@w3.org>>
Subject: Re: text-wrap balance

The use case for text-wrap: balance is particularly nice for captions where best practice in caption authoring requires the author to balence the rendered lines for better readability.

I wonder if this would also be relevant to TTML? Would it make sense to lobby the CSS group for it?

Kind regards,
Silvia.


On Sat., 15 Jun. 2019, 3:39 am Philippe Le Hégaret, <plh@w3.org<mailto:plh@w3.org>> wrote:
Forwarding here with permission:

-------- Forwarded Message --------
Subject: Re: Fwd: Re: text-wrap balance
Date: Fri, 14 Jun 2019 09:45:37 -0400
From: Chris Lilley <chris@w3.org<mailto:chris@w3.org>>
To: Philippe Le Hégaret <plh@w3.org<mailto:plh@w3.org>>, Fuqiao Xue <xfq@w3.org<mailto:xfq@w3.org>>


On 2019-06-13 16:55, Philippe Le Hégaret wrote:
 > Chris, Fuqiao,
 >
 > the Timed Text Group/WebVTT is wondering what to do with text-wrap:
 > balance. Do you know or can you find the story behind it? WebVTT
 > relies on that value but if no one implements it, there isn't much
 > point...


text-wrap: balance (and no-wrap) was proposed for CSS by Adobe. There
used to be a proposal on their site [1] but that has disappeared.

It is not in CSS Text 3 but was added to CSS Text 4 [2][3] and Adobe
also maintains a JQuery plugin [4] which implements it. There are no wpt
tests for the text-wrap property [5]

I have seen other implementations of line-balancing in JS. Other plugins
or polyfils will be easier once Houdini provides the ability to measure
the length of a line.

There are a couple of open issues: [6][7][8][9]. From [7], Apple seems
to be slightly against due to the iterative algorithm (number of passes
is unknown, and interaction with text fragmentation is unclear).

Current status seems to be a bunch of web developer interest, no
implementer interest. The spec might be improved by a couple of good,
visual examples. Needs evangelism to demonstrate need, I suspect.

[1] https://adobe-webplatform.github.io/balance-text/proposal/index.html
[2] https://www.w3.org/TR/css-text-4/#text-wrap Sept 2018
[3] https://drafts.csswg.org/css-text-4/#text-wrap
[4] https://github.com/adobe/balance-text
[5] https://github.com/web-platform-tests/wpt/tree/master/css/css-text
[6] https://github.com/w3c/csswg-drafts/issues/3047 (from frivoal
<https://github.com/frivoal>)
[7] https://github.com/w3c/csswg-drafts/issues/2528 (from tobireif)
<https://github.com/tobireif>
[8] https://github.com/w3c/csswg-drafts/issues/1975 (from palemieux
<https://github.com/palemieux>)
[9] https://github.com/w3c/csswg-drafts/issues/803 (from frivoal
<https://github.com/frivoal>)


On 6/13/2019 4:33 PM, Silvia Pfeiffer wrote:
> FWIW, I think asking a status update from the CSS group on this particular
> feature would be great.
>
> Cheers,
> Silvia.
>
>
> On Thu., 13 Jun. 2019, 9:09 pm Philippe Le Hégaret, <plh@w3.org<mailto:plh@w3.org>> wrote:
>
>>
>>
>> On 6/12/2019 10:43 PM, Pierre-Anthony Lemieux wrote:
>>> Hi Gary et al.,
>>>
>>> In recent publications the group has gone to great lengths to make
>>> sure that at least two implementations passed each test, whether for
>>> exotic or trivial features.
>>   >> Why would it be different here? Have the criteria changed? Should
>>> future versions of TTML and WebVTT have to meet a lower threshold of
>>> "proof-of-concept"?
>>>
>>> I think the group needs to be consistent, one way or another.
>>
>> I thought the exit criteria was 2 implementations of each feature. There
>> is a difference between tests and features.
>>
>> However, I'm not suggesting that the difference matters in this
>> particular test, given that the spec is clear on this particular test.
>> If the value balance isn't supported today, what are the implementations
>> doing instead of balance? Chromium doesn't seem to have a bug report on
>> balance for example. Should we ask the CSS Working Group on the status
>> and stability of balance? (Gary, I'm happy to go on fact findings if
>> you'd like)
>>
>> Philippe
>>
>>
>

Received on Monday, 17 June 2019 10:06:09 UTC