W3C home > Mailing lists > Public > public-tt@w3.org > February 2016

Re: {minutes} TTWG Meeting 2016-02-18

From: Nigel Megitt <nigel.megitt@bbc.co.uk>
Date: Fri, 19 Feb 2016 17:55:37 +0000
To: Glenn Adams <glenn@skynav.com>
CC: TTWG <public-tt@w3.org>
Message-ID: <D2ED063E.35916%nigel.megitt@bbc.co.uk>
From: Glenn Adams <glenn@skynav.com<mailto:glenn@skynav.com>> Date: Thursday, 18 February 2016 18:50

On Thu, Feb 18, 2016 at 9:05 AM, Nigel Megitt <nigel.megitt@bbc.co.uk<mailto:nigel.megitt@bbc.co.uk>> wrote:



   nigel: Just to note that we have a merged PR, which I
   submitted, which updates all the issue links to point to
   ... The media timing semantics PR is still open.
   ... There's also been discussion of the use of inline block


     [15] https://github.com/w3c/ttml2/issues/146

   nigel: On this one I was concerned that the semantics lead to
   unwanted behaviours, but I think we can get around them
   ... mostly using nested span. The only outstanding issue I
   cannot find a way to solve right now is that BBC wants to be
   ... able to paint background areas behind spans that have the
   same height as lineHeight, and we cannot see a reliable
   ... way to do this. I plan to file an issue within the next
   week unless we can work out how.
   ... I can't see a way yet to achieve this in CSS, and it may
   need a new semantic on tts:padding to allow that to happen.

It would be useful to see some images depicting desired results; this looks similar to a problem I addressed in an SVG implementation (batik) to add support for background coloring of text and tspan elements, wherein I defined:

Something like the attached might help. The line height is in general larger than the font size, and we wish to extend the background area of each line area to match the line height so that adjacent line areas are drawn without any gap in background.

An effect similar to this is achieved on most browsers by using inline display semantics but I have been unable to make this work alongside other constraints such as text wrapping and white space pruning.

I haven't found a way to do it in CSS, but it can be done reliably in Javascript by querying the line areas heights and then updating padding. Clearly we want a solution that is not dependent on scripting if possible, though mapping a new non-CSS semantic may require it of course.

background-color: <color>
background-mode: bbox | lineHeight
background-padding: <length>{1,4}

The second of these, background-mode, determined the extent of the rectangles to colorize;

That seems exactly what we want.

the third of these, background-padding, allows manually extending the background color rectangle on any of the edges.

We could do something like this in TTML2; however, it might not readily translate to an HTML/CSS based renderer.

I'd like to explore how we can express this semantic in TTML2. Any suggestions?



(image/png attachment: bg-requirements_2_.png)

Received on Friday, 19 February 2016 17:56:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:43:58 UTC