- From: Glenn Maynard <glenn@zewt.org>
- Date: Sat, 31 Dec 2011 00:46:05 -0500
- To: Ian Hickson <ian@hixie.ch>
- Cc: "public-texttracks@w3.org" <public-texttracks@w3.org>
- Message-ID: <CABirCh-cVfptbikN-v5jdvk2E3bsVQUdwDRdEDa=cP-XSrqi7Q@mail.gmail.com>
On Mon, Dec 5, 2011 at 11:37 PM, Glenn Maynard <glenn@zewt.org> wrote: > On Mon, Dec 5, 2011 at 7:38 PM, Ian Hickson <ian@hixie.ch> wrote: > >> > If wrapping to similar line lengths is what's wanted, then the VTT >> > renderer (and so CSS) should support that. >> >> Possibly. It's not currently. It would require a new 'white-space' value. >> Given that, it would be easy to support in VTT; just have authors not use >> line breaks at all, and let the renderer do it. >> > > I think this is much better than having people do it by hand. > As a real example of this sort of approach causing problems, see the attached, which is from the YouTube Android app. When the caption font size is set to "extra large", it falls apart. (In case the archive breaks attachments: http://i.imgur.com/IaGNv.png, http://i.imgur.com/zcgTv.png.) This could also be triggered by differences in font engines, different fonts being used (for any number of reasons), differences in word-breaking and hyphenization rules (both of which are left to the UA), the stylesheet used during authoring not being loaded, and so on. It also makes manual editing of captions harder, since you need to view the final output in order to adjust wrapping. It complicates tools significantly: *every* tool that modifies caption text will need some way to update wrapping, which means every tool effectively needs access to a complete parser, renderer, the fonts (assumed to be) in use, and so on. If you want to change the line width, you have to re-wrap the entire document. Allowing a user-adjustable maximum width (as any eBook reader supports) is probably impossible. WebVTT inherited this problem from SRT. This was already solved by SSA (which has entirely replaced SRT, in my experience, not that I particularly like the SSA format as a whole), so this feels like a big step back. I hope this can be fixed, with a new default wrapping mode, eg. text-wrap: balanced and text-space-collapse: collapse, and an explicit <br> tag for when it's really needed. -- Glenn Maynard
Attachments
- image/png attachment: small.png
- image/png attachment: extra_large.png
Received on Saturday, 31 December 2011 05:46:38 UTC