- From: Glenn Maynard <glenn@zewt.org>
- Date: Wed, 25 Apr 2012 09:40:19 -0500
- To: Ian Hickson <ian@hixie.ch>
- Cc: "public-texttracks@w3.org" <public-texttracks@w3.org>
Received on Wednesday, 25 April 2012 14:40:48 UTC
On Tue, Apr 24, 2012 at 4:43 PM, Ian Hickson <ian@hixie.ch> wrote: > I've fixed WebVTT to say that lines should be wrapped with line balancing. > So now if you want good line wrapping you can just put it all on one line, > and if you want explicit line breaks you can just put those in too. > > Regardless of the value of the 'white-space' property, any line breaks inserted by the user agent for the purposes of line wrapping must be placed so as to minimise Δ across each run of consecutive lines between preserved newlines in the source. Δ for a set of lines is defined as the sum over each line of the absolute of the difference between the line's length and the mean line length of the set. This sounds like the "optimal" approach that was--from what I understand--rejected from CSS because it was O(n^2). The algorithm I proposed is is O(n), so it should be possible to change it into a CSS white-space style later (which is really where it belongs). s/absolute/absolute value/ -- Glenn Maynard
Received on Wednesday, 25 April 2012 14:40:48 UTC