Skip to content

Commit

Permalink
Clarify fillLineGap semantics when applied to successive p elements (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
palemieux committed Nov 5, 2017
1 parent 2240efa commit db6ca9f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 3 deletions.
41 changes: 41 additions & 0 deletions imsc1/spec/examples/fillLineGap-example-2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xmlns:tts="http://www.w3.org/ns/ttml#styling"
xmlns:itts="http://www.w3.org/ns/ttml/profile/imsc1#styling"
ttp:timeBase="media"
xml:lang="en"
ttp:cellResolution="50 30"
ttp:profile="http://www.w3.org/ns/ttml/profile/imsc1/text">
<head>
<styling>
<style xml:id="spanStyle" tts:color="#ffffff" tts:backgroundColor="#000000" />
<style xml:id="paragraphStyleNoGap" tts:fontFamily="monospaceSerif" tts:textAlign="center" tts:fontSize="200%" tts:lineHeight="165%" itts:fillLineGap="true"/>
<style xml:id="paragraphStyle" tts:fontFamily="monospaceSerif" tts:textAlign="center" tts:fontSize="200%" tts:lineHeight="165%" itts:fillLineGap="false"/>

</styling>
<layout>
<region xml:id="bottom" tts:origin="10% 10%" tts:extent="80% 80%" tts:displayAlign="after" />
<region xml:id="top" tts:origin="10% 10%" tts:extent="80% 80%" tts:displayAlign="before" />

</layout>
</head>
<body>
<div region="bottom" begin="00:00:00.000" end="00:00:30.000">
<p xml:id="subtitle1" style="paragraphStyle">
<span style="spanStyle">Paragraph 1</span>
</p>
<p xml:id="subtitle1" style="paragraphStyle">
<span style="spanStyle">Paragraph 2</span>
</p>
</div>
<div region="top" begin="00:00:00.000" end="00:00:30.000">
<p xml:id="subtitle1" style="paragraphStyleNoGap">
<span style="spanStyle">Paragraph 1</span>
</p>
<p xml:id="subtitle1" style="paragraphStyleNoGap">
<span style="spanStyle">Paragraph 2</span>
</p>
</div>
</body>
</tt>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions imsc1/spec/ttml-ww-profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ <h4>ittp:activeArea</h4>
<section id='itts-fillLineGap'>
<h4>itts:fillLineGap</h4>

<p>The <code>itts:fillLineGap</code> attribute allows the author to control the application of background between line
areas.</p>
<p>The <code>itts:fillLineGap</code> attribute allows the author to control the application of background between
successive line areas.</p>

<p>If <code>itts:fillLineGap="true"</code> then the background of each inline area generated by descendant spans of the
<code>p</code> element SHALL extend to the <em>before-edge</em> and <em>after-edge</em> of its containing line area
Expand Down Expand Up @@ -1048,14 +1048,28 @@ <h4>itts:fillLineGap</h4>
</pre>

<figure id='fig-fillLineGap'>
<img src="figures/fillLineGap-example-figure-1.png" alt="itts:fillLineGap rendering example">
<img src="figures/fillLineGap-example-figure-1.png" alt="itts:fillLineGap rendering example 1">

<figcaption>
Illustrative rendition of the example immediately above with <code>itts:fillLineGap="true"</code> removed (left) or
preserved (right). Blue lines have been added to show the <em>before-edge</em> and <em>after-edge</em> of each line
area, which are coincident for successive line areas.
</figcaption>
</figure>

<p>Also, as illustrated in the following example, because the line areas of successive <code>p</code> elements are
contiguous, no gap exists between two successive <code>p</code> elements where<code>itts:fillLineGap="true"</code>.</p>
<pre class='example' data-include='examples/fillLineGap-example-2.xml' data-include-format='text'>
</pre>

<figure id='fig-fillLineGap-2'>
<img src="figures/fillLineGap-example-figure-2.png" alt="itts:fillLineGap rendering example 2">

<figcaption>
Illustrative rendition of the example immediately above, where <code>itts:fillLineGap="true"</code> on the two
paragraphs of the top region, <code>itts:fillLineGap="false"</code> on the two paragraphs of the bottom region.
</figcaption>
</figure>
</section>
</section>

Expand Down

0 comments on commit db6ca9f

Please sign in to comment.