- From: Glenn A. Adams <glenn@xfsi.com>
- Date: Wed, 13 Aug 2003 12:23:30 -0400
- To: <Johnb@screen.subtitling.com>
- Cc: <public-tt@w3.org>
- Message-ID: <7249D02C4D2DFD4D80F2E040E8CAF37C03BCF6@longxuyen.xfsi.com>
While it isn't rocket science, it isn't trivial either. It basically maps to the integer programming problem, which requires backtracking. Keep in mind that you would have to balance over a potentially arbitrary number of lines and you would have to parameterize how unbalanced to permit a given line. In a former career, I developed hyphenation and justification engines for the pre-press industry, wherein I implemented river control. I can assure you it is non-trivial, and I would not expect any AF to DF (distribution format) transcoder to implement such a feature simply on the basis of cost to benefit ratio. G. -----Original Message----- From: Johnb@screen.subtitling.com [mailto:Johnb@screen.subtitling.com] Sent: Wednesday, August 13, 2003 12:30 PM To: Glenn A. Adams Cc: public-tt@w3.org Subject: RE: Balanced lines Glenn, Interesting, I was unaware that there was a type-setting term for this. I'm not surprised though. [GA] I can't imagine that any subtitle/cc user agent would implement it. It's true that the majority of current distribution formats assume that there is little or no UA re-layout of content, that's because these formats are distribution formats. TT-AF is not. I anticipate that there will be a requirement to translate TT-AF into distribution formats for many applications - not just subtitling / captioning. Since these distribution formats may well implicitly impose various display limitations (e.g. fixed line lengths, colour limitations, font sizes), the inclusion of mechanisms within TT-AF to hint at the preferred end results would be useful. Line balancing is hardly rocket science... BTW - I'm not suggesting a sentential analysis of the content. But certain basic rules. 1) In a fixed size region - move words from line to line until line lengths balance. 2) avoid short (i.e. 1 character or 2 charater words at the ends of sentences) e.g. She was annoyed because I didn't ask her to come with us. is preferred over She was annoyed because I didn't ask her to come with us. regards John Birch The views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of Screen Subtitling Systems Limited. -----Original Message----- From: Glenn A. Adams [mailto:glenn@xfsi.com] Sent: 13 August 2003 15:29 To: Johnb@screen.subtitling.com Cc: public-tt@w3.org Subject: RE: Balanced lines The type of line break behavior you refer to below is considered to be an advanced typesetting feature only available in fairly high-end pre-press systems (it is known in typesetting as "river control"). I can't imagine that any subtitle/cc user agent would implement it. See http://www.coathook.pwp.blueyonder.co.uk/comp/comp3a.htm for some discussion of river control. Also, clearly a UA is not going to perform sentential analysis to determine line break points. G. -----Original Message----- From: Johnb@screen.subtitling.com [mailto:Johnb@screen.subtitling.com] Sent: Wednesday, August 13, 2003 11:02 AM To: Glenn A. Adams Cc: public-tt@w3.org Subject: Balanced lines Glenn [JB> ] CSS wrap-option property does not have a value that produces balanced lines. Justification properties do not appear to help either. GA: What do you mean by "balanced lines"? If you mean left and right block justified, then the text-align property would be used to specify justify. Whether to perform soft layout, i.e., UA line wrapping, is independent of the alignment of line areas in the containing block area. [JB> ] No I don't mean block justified. It's an issue of where in the lines to put a line break. So given a content of "Scooby dooby doo where are you?" a typical line break mechanism might break this as follows for a 22 character 2 line display (for ease lets assume a fixed font - as in Teletext). Scooby dooby doo where are you? The more balanced lines would be Scooby dooby doo where are you? From Australian Caption Centre guidelines " Where possible, caption lines should also be similar in length because this makes them much easier to read." YMMV There are a number of other 'rules' regarding line breaking that may or may not be desirable. However most of these require a detailed understanding of grammar....which I think is probably straying well outside the remit.... regards John Birch The views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of Screen Subtitling Systems Limited.
Received on Wednesday, 13 August 2003 12:23:35 UTC