[ttml2] inline block semantics break text wrapping

nigelmegitt has just created a new issue for 
https://github.com/w3c/ttml2:

== inline block semantics break text wrapping ==
Where inline block semantics apply, which give good and desirable 
effects in most cases, there's one extremely undesirable effect, which
 is that those inline blocks are treated as unbreakable units for line
 wrapping in the surrounding block.

Consider:

```xml
<style xml:id="s1" tts:backgroundColor="black" tts:color="white" 
tts:textAlign="left">
...
<p tts:textAlign="center">
<span style="s1">This line would normally not wrap but the author put 
too many words in so it does</span>
<br/>
<span style="s1">This line is short</span>
```

which results in more than one line area for the first long line, with
 a single background rectangle covering all of the line areas, whereas
 the desired behaviour was to apply the background only to the each 
individual line area.

Or this:

```xml
<p>
<span tts:bpd="auto" begin="0s">A</span><span tts:bpd="auto" 
begin="1s"> new</span><span tts:bpd="auto" begin="2s"> 
word.</span><span tts:bpd="auto" begin="3s"> A whole sentence.</span>
</p>
```

In this case each word is in its own span to apply timing, and 
coincidentally we also want to apply some styling that switches on 
inline block semantics. Now we get three unwanted effects:

1. the blank space at the beginning of each span, which would have 
been displayed previously is now stripped out as blank space unless we
 also take care to preserve it.
2. if we preserve the blank space and the span wraps onto a new line 
then it appears at the beginning of the new line instead of being 
stripped off as we would expect with normal wrapping.
3. the " A whole sentence." span can not be broken at all, even if it 
should be - it wraps as a single unit.

We need to rethink the use of inline block semantics especially with 
respect to wrapping. Would it be feasible to state that inline block 
semantics apply to the post-layout inline areas only?

Please view or discuss this issue at 
https://github.com/w3c/ttml2/issues/146 using your GitHub account

Received on Tuesday, 9 February 2016 17:35:18 UTC