W3C home > Mailing lists > Public > public-tt@w3.org > December 2008

Re: TextAlign002 and use of textAlign on span elements

From: Glenn A. Adams <gadams@xfsi.com>
Date: Thu, 11 Dec 2008 12:08:51 +0800
To: John Birch <john.birch@screen.subtitling.com>, Philippe Le Hegaret <plh@w3.org>, Public TTWG List <public-tt@w3.org>
Message-ID: <C566B353.6E10%gadams@xfsi.com>

Inline below.

On 12/11/08 7:05 AM, "John Birch" <john.birch@screen.subtitling.com> wrote:

> One aspect of broadcast subtitling requirements is multiple text alignments
> within a single displayed line... I.e left and right aligned text on the same
> 'displayed' line... While I realise this can be achieved using multiple
> overlapping regions with different alignment styles that's not an ideal
> solution...
This behavior doesn¹t really work with the inline packing formatting model
which is used by DFXP (as based on XSL). The box model of CSS also does not
support this. So it is very unlikely we will do so in DFXP. This would also
be a new requirement, which we are really not entertaining at this time,
particularly since  there is already a solution in DFXP to support this
indirectly (as you note). I think you should avoid modeling such behavior on
the basis of the notion of having a single line.

What you are calling a single line is actually much more complex. In XSL it
could be expressd as a table row with multiple cells (without borders) with
each cell having different text alignments on their internal block content,
something like:

  <fo:table border=²none²>
    <fo:table-body border=²none²>
      <fo:table-row border=²none²>
        <fo:table-cell inline-progression-dimension=²50%² border=²none²>
          <fo:block text-align=²left²>
            <fo:inline>LEFT ALIGNED</fo:inline>
        <fo:table-cell inline-progression-dimension=²50%² border=²none²>
          <fo:block text-align=²right²>
            <fo:inline>RIGHT ALIGNED</fo:inline>

Of course, DFXP does not support tables, and it would add considerable
complexity to do so now.
> Does a p element imply a crlf?

If you are asking whether an empty <p/> element would cause the insertion of
an empty block (line) area, then the answer is no. This is not implied by
DFXP¹s presentation processing semantics. However, you could achieve this by
using any of the following examples (and others):

(1) <p><br/></p>
(2) <p xml:space=²preserve²>&#x000A;</p>
(3) <p xml:space=²preserve²>&#x0020;</p>

All of these result in the generation of a single block (line) area which
height is determined by applicable font* and lineHeight properties. The
first of these three examples would be preferable.

Received on Thursday, 11 December 2008 04:09:36 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 18:24:03 UTC