W3C home > Mailing lists > Public > public-tt@w3.org > May 2012

ISSUE-168 (padding style attribute): Padding on tt:p and tt:span elements

From: Timed Text Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 08 May 2012 20:27:14 +0000
Message-Id: <E1SRr06-0006aA-Ei@tibor.w3.org>
To: public-tt@w3.org
ISSUE-168 (padding style attribute): Padding on tt:p and tt:span elements

http://www.w3.org/AudioVideo/TT/tracker/issues/168

Raised by: Sean Hayes
On product: 

Will there be an entry in the tracker for this?

In addition I attach an html-example that shows the wished behaviour and a CSS definition that is similiar to the needed TTML styles.

Best regards,

Andreas

Am 25.04.2012 21:56, schrieb Sean Hayes:
While what you say is true it is very inconvenient from an authoring perspective, and if the user can set the font (which is a requirement of the FCC rules), then you need the region to be able to adapt. Better to use the <p> background which does adapt naturally. You can artificially introduce the padding using spans with preserved space, however this is a pretty ugly hack. I think it makes sense to allow padding on these elements.
 
From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: 25 April 2012 17:04
To: John Birch
Cc: tai@irt.de; public-tt@w3.org
Subject: Re: Padding on tt:p and tt:span elements
 
 
On Wed, Apr 25, 2012 at 9:33 AM, John Birch <John.Birch@screensystems.tv> wrote:
You hit the nail on the head. Font size at authoring time is only true if font exists at browser... Otherwise substitution means all bets are off.
 
not quite; you can always overestimate the size which permits containment without overflow
 
Best regards,
John

 
From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: Wednesday, April 25, 2012 04:00 PM
To: John Birch 
Cc: Andreas Tai <tai@irt.de>; public-tt <public-tt@w3.org> 
Subject: Re: Padding on tt:p and tt:span elements 
 
 
On Wed, Apr 25, 2012 at 5:22 AM, John Birch <John.Birch@screensystems.tv> wrote:
In TTML as I understand it(as a result of derivation from xsl:fo?), there is no possible mechanism that can set the region size as a result of a calculation of the rendered text size on the display. In contrast to broadcast practises, in TTML the text is fitted inside a predefined region (or overflows / clips), rather than the region (growing) fitting the text.
 
it can, if the size can be determined at authoring time; but that will depend on font usage; so you are correct that if the font size is unknown, then you may have to overestimate the size, e.g., by using em or c length units 

On Tue, Apr 24, 2012 at 1:41 AM, Andreas Tai <tai@irt.de> wrote:
As in TTML a region has always a predefined size, tt:p- and tt:span elements are the better choices to apply a non-transparent background color on a subtitle block that dynamically grows and shrinks with the corresponding text.

I'm not sure I understand what you mean by "has always a predefined size". If by this you mean the "same" size, then I would not agree. A region's size (extent) can be changed at any time by using <tt:set>.
 
Unfortunately padding cannot be applied to tt:p and tt:span elements and the very common use case to have empty space between text and the border of a centered "text box" with dynamic width is hard to implement (for an illustration of two use cases see the attached images).

Therefore the EBU-Working group that specifies the TTML subset EBU-TT sees the requirements to add padding as an applicable style property for the tt:p and tt:span elements.
Best regards,
Andreas

----------


As in TTML a region has always a predefined size, tt:p- and tt:span elements are the better choices to apply a non-transparent background color on a subtitle block that dynamically grows and shrinks with the corresponding text.

Unfortunately padding cannot be applied to tt:p and tt:span elements and the very common use case to have empty space between text and the border of a centered "text box" with dynamic width is hard to implement (for an illustration of two use cases see the attached images).

Therefore the EBU-Working group that specifies the TTML subset EBU-TT sees the requirements to add padding as an applicable style property for the tt:p and tt:span elements.

Best regards,

Andreas
Received on Tuesday, 8 May 2012 20:27:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:06:04 UTC