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:block>
  <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:block>
        </fo:table-cell>
        <fo:table-cell inline-progression-dimension=²50%² border=²none²>
          <fo:block text-align=²right²>
            <fo:inline>RIGHT ALIGNED</fo:inline>
          </fo:block>
        </fo:table-cell>
      </fo:table-row>
    </fo:table-body>
  </fo:table>
</fo:block>

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.

Glenn
Received on Thursday, 11 December 2008 04:09:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 November 2009 22:41:39 GMT