ISSUE-168: Padding on tt:p and tt:span elements

padding style attribute

Padding on tt:p and tt:span elements

State:
CLOSED
Product:
TTML2
Raised by:
Sean Hayes
Opened on:
2012-05-08
Description:
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
Related Actions Items:
No related actions
Related emails:
  1. TTML Agenda for 19/09/13 (from Sean.Hayes@microsoft.com on 2013-09-19)
  2. No Meeting today 12-09-13 (from Sean.Hayes@microsoft.com on 2013-09-12)
  3. Minutes for 05/09/13 (from nigel.megitt@bbc.co.uk on 2013-09-05)
  4. Agenda for 05/09/13 (from glenn@skynav.com on 2013-09-04)
  5. RE: TTML Agenda for 29/08/13 (from mdolan@newtbt.com on 2013-08-28)
  6. TTML Agenda for 29/08/13 (from glenn@skynav.com on 2013-08-28)
  7. Re: Padding on tt:p and tt:span elements (from tai@irt.de on 2013-07-17)
  8. Re: Padding on tt:p and tt:span elements (from John.Birch@screensystems.tv on 2013-07-17)
  9. Re: Padding on tt:p and tt:span elements (from nigel.megitt@bbc.co.uk on 2013-07-17)
  10. Re: Padding on tt:p and tt:span elements (from glenn@skynav.com on 2013-07-16)
  11. Re: Padding on tt:p and tt:span elements (from tai@irt.de on 2013-07-16)
  12. TTWG Agenda March 7, 2013 (from momartin@microsoft.com on 2013-03-07)
  13. Re: TTML Agenda for 28/2/13 (from glenn@skynav.com on 2013-02-28)
  14. RE: TTML Agenda for 28/2/13 (from mdolan@newtbt.com on 2013-02-28)
  15. TTML Agenda for 28/2/13 (from momartin@microsoft.com on 2013-02-28)
  16. TTWG Meeting Minutes Feb 7, 2013 (from momartin@microsoft.com on 2013-02-14)
  17. TTWG Meeting Minutes Feb 7, 2013 (from momartin@microsoft.com on 2013-02-07)
  18. TTML Agenda for 07/02/13 (from Sean.Hayes@microsoft.com on 2013-02-07)
  19. Minutes TTWG Aug 16, 2012 (from momartin@microsoft.com on 2012-08-17)
  20. RE: TTML Agenda for 15/8/12 (from momartin@microsoft.com on 2012-08-16)
  21. Fwd: TTML Agenda for 15/8/12 (from geoff_freed@wgbh.org on 2012-08-16)
  22. Re: TTML Agenda for 15/8/12 (from geoff_freed@wgbh.org on 2012-08-16)
  23. TTML Agenda for 15/8/12 (from Sean.Hayes@microsoft.com on 2012-08-16)
  24. Re: Padding on tt:p and tt:span elements (from tai@irt.de on 2012-05-24)
  25. RE: Padding on tt:p and tt:span elements (from Sean.Hayes@microsoft.com on 2012-05-08)
  26. ISSUE-168 (padding style attribute): Padding on tt:p and tt:span elements (from sysbot+tracker@w3.org on 2012-05-08)

Related notes:

changing this to a TTML.next issue, since tt:p and tt:span don't support padding in 1.0

Glenn Adams, 2 May 2013, 04:36:15

Implemented. https://dvcs.w3.org/hg/ttml/rev/edf3344d2924

Support application of padding to all content elements (except br).

Glenn Adams, 24 Aug 2013, 23:22:33

Changelog:

Created issue 'Padding on tt:p and tt:span elements' nickname padding style attribute owned by Sean Hayes on product , description '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' non-public

Sean Hayes, 8 May 2012, 20:27:14

Product changed to DFXP 1.0

Philippe Le Hégaret, 23 Aug 2012, 14:51:26

Product changed to TTML.next

Glenn Adams, 2 May 2013, 04:36:15

Status changed to 'pending review'

Glenn Adams, 24 Aug 2013, 23:22:33

Status changed to 'closed'

19 Sep 2013, 14:59:18


David Singer <singer@apple.com>, Nigel Megitt <nigel.megitt@bbc.co.uk>, Chairs, Thierry Michel <tmichel@w3.org>, Philippe Le Hégaret <plh@w3.org>, Staff Contacts
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.323 2013-12-19 14:47:09 dom Exp $