Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itts:fillLineGap is unclear about what it is filling between exactly #263

Closed
mikedo opened this issue Oct 11, 2017 · 9 comments
Closed

itts:fillLineGap is unclear about what it is filling between exactly #263

mikedo opened this issue Oct 11, 2017 · 9 comments
Assignees

Comments

@mikedo
Copy link

mikedo commented Oct 11, 2017

While exploring a possible implementation of itts:fillLineGap, it is unclear which lines this applies to. It is inheritable but only applies to <p>. Does that mean it applies only to all lines within the <p> (i.e. as separated by <br/>)? Does it also apply between the lines in adjacent <p> (perhaps if they both have it set to true, including through inheritance)? If the former (only intra-<p> lines), how does one fill gaps between all lines? If the latter (including inter-<p> lines), how does one intentionally leave a gap between adjacent <p>?

This indirectly creates a semantic difference between <p> and <br/>.

I believe it is highly desirable to be able to fill all line gaps in a region. I'm not sure about the use case for enabling gaps between <p>.

At a minimum, this needs clarification in IMSC1.0.1 (and thus IMSC1.1).

@palemieux
Copy link
Contributor

palemieux commented Oct 11, 2017

For illustration, assuming that itts:fillLineGap applies only to lines within a <p>:

document_1.ttml:

<?xml version="1.0" encoding="UTF-8"?>
<tt ttp:cellResolution="60 20" xml:lang="en" 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">
  <head>
    <styling>
      <style xml:id="s1" tts:backgroundColor="black"/>
    </styling>
    <layout>
      <region xml:id="r1" tts:color="white" tts:lineHeight="200%" tts:displayAlign="after" itts:fillLineGap="true"/>
    </layout>

  </head>
  <body>
    <div region="r1" >
      <p begin="0s" end="3s">
        <span style="s1">Lorem ipsum dolor sit</span>
      </p>
      <p begin="1s" end="3s">
        <span style="s1">Amet consectetur adipiscing elit</span>
      </p>
    </div>
  </body>
</tt>

document_1


document_2.ttml:

<?xml version="1.0" encoding="UTF-8"?>
<tt ttp:cellResolution="60 20" xml:lang="en" 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">
  <head>
          <styling>
      <style xml:id="s1" tts:backgroundColor="black"/>
    </styling>
    <layout>
      <region xml:id="r1" tts:color="white" tts:lineHeight="200%" tts:displayAlign="after" itts:fillLineGap="true"/>
    </layout>

  </head>
  <body>
    <div region="r1" >
      <p>
      <span begin="0s" end="3s" style="s1">Lorem ipsum dolor sit<br/></span>
      <span begin="1s" end="3s" style="s1">Amet consectetur adipiscing elit</span>
      </p>
    </div>
  </body>
</tt>

document_2

@cconcolato
Copy link

Could you update the images to indicate to which document it refers? It seems that the images are not in the same order as the document examples. Image 1 corresponds to document 2, and image 2 to document 1. Is that right?

@palemieux
Copy link
Contributor

@cconcolato Done.

@nigelmegitt
Copy link
Contributor

Answers to your questions @mikedo :

Does that mean it applies only to all lines within the <p> (i.e. as separated by <br/>)?

Yes, however lines can also be generated by text wrapping even in the absence of <br/>s.

Does it also apply between the lines in adjacent <p> (perhaps if they both have it set to true, including through inheritance)?

No. As you identified, it is specified as applying only to <p> elements and affecting the presentation of line areas within each <p> element, so it defines no behaviour at the boundaries of adjacent <p>s.

At the moment this feature supports no requirements associated with adjacent <p>s at all, since none were ever raised when this was discussed - likewise for all line areas in a region.

I think @palemieux has covered your other questions.

Paragraphs vs line breaks?

An observation from the examples earlier in the thread: my starting point for understanding the semantic difference between <p> and <br> in TTML is that they should be considered the same as in HTML: see paragraph and br:

A paragraph is typically a run of phrasing content that forms a block of text with one or more sentences that discuss a particular topic, as in typography, but can also be used for more general thematic grouping.

In the case of subtitles and captions, I think both apply in different circumstances, which might be a driver for extending the requirements. For example it may be reasonable to separate caption dialogue spoken by different people into distinct <p>s, without introducing a gap in the background area.

@css-meeting-bot
Copy link
Member

css-meeting-bot commented Oct 12, 2017

The Working Group just discussed itts:fillLineGap is unclear about what it is filling between exactly #263, and agreed to the following resolutions:

  • SUMMARY: @palemieux to attempt to exemplify this without substantive changes.
The full IRC log of that discussion <nigel> Topic: itts:fillLineGap is unclear about what it is filling between exactly #263
<nigel> github: https://github.com//issues/263
<nigel> Pierre: Were you happy with the renders Nigel?
<nigel> Nigel: Yes I think so.
<nigel> Pierre: My proposal is not to make any normative changes in IMSC 1.0.1 but to add
<nigel> .. informative text and those examples, as well as maximising the chances of using
<nigel> .. roll-up harmoniously with fillLineGap, would resolve this issue.
<nigel> .. It was not completely intuitive to me, but since fillLineGap didn't exist before, just saying
<nigel> .. how to use it should work.
<nigel> Cyril: Nigel you said line areas can be generated without `<br>`s?
<nigel> Nigel: Yes, line areas can be generated by line wrapping.
<nigel> SUMMARY: @palemieux to attempt to exemplify this without substantive changes.

@andreastai
Copy link

I do not see any issues with applying linegap to p elements. Both examples given from Pierre should not show any gap by definition of the feature.

If itts:fillLineGap="true" then the background of each inline area generated by descendant spans of the p element SHALL extend to the before-edge and after-edge of its containing line area (before-edge and after-edge are defined at Section 4.2.3 of [XSL11]).

Background color is extended to the full with of the line area. With two adjacent p elements with one row each there are just two line areas where the part with text is filled with background to to the full height of the line area.

@nigelmegitt
Copy link
Contributor

nigelmegitt commented Oct 13, 2017

I hadn't thought of it that way @TairT - I see what you mean. Even though the spec doesn't say anything about behaviour between <p>s, it should result in there being no gaps if itts:fillLineGap="true" is specified on two consecutive <p>s.

Thinking ahead - padding

By the way, when applying this to TTML2 we may need to be careful about tts:padding since unlike in TTML1, it applies to <p> and <span> (and other elements). This may mean that for IMSC 1.1 we need a change to the normative definition to disambiguate or prioritise padding vs fillLineGap, I'm not sure. It probably needs some more work to think it through.

@palemieux
Copy link
Contributor

@TairT @nigelmegitt Below are revised renders based on #263 (comment) . Please confirm they meet your expectations.

Timing on <p>:

<?xml version="1.0" encoding="UTF-8"?>
<tt ttp:cellResolution="60 20" xml:lang="en" 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">
  <head>
    <styling>
      <style xml:id="s1" tts:backgroundColor="black"/>
    </styling>
    <layout>
      <region xml:id="r1" tts:color="white" tts:lineHeight="200%" tts:displayAlign="after" itts:fillLineGap="true"/>
    </layout>

  </head>
  <body>
    <div region="r1" >
      <p begin="0s" end="3s">
        <span style="s1">Lorem ipsum dolor sit</span>
      </p>
      <p begin="1s" end="3s">
        <span style="s1">Amet consectetur adipiscing elit</span>
      </p>
    </div>
  </body>
</tt>

timing-on-p


Timing on <span>:

<?xml version="1.0" encoding="UTF-8"?>
<tt ttp:cellResolution="60 20" xml:lang="en" 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">
  <head>
          <styling>
      <style xml:id="s1" tts:backgroundColor="black"/>
    </styling>
    <layout>
      <region xml:id="r1" tts:color="white" tts:lineHeight="200%" tts:displayAlign="after" itts:fillLineGap="true"/>
    </layout>

  </head>
  <body>
    <div region="r1" >
      <p>
      <span begin="0s" end="3s" style="s1">Lorem ipsum dolor sit<br/></span>
      <span begin="1s" end="3s" style="s1">Amet consectetur adipiscing elit</span>
      </p>
    </div>
  </body>
</tt>

timing-on-span

@nigelmegitt
Copy link
Contributor

I think they look good @palemieux .

@palemieux palemieux self-assigned this Oct 22, 2017
@palemieux palemieux removed the pr open label Jan 29, 2018
palemieux added a commit that referenced this issue Mar 8, 2018
* Clarify fillLineGap semantics when applied to successive p elements (#263)
* Editorial tweaks (Close #271)
* Clarify forcedDisplay semantics (#284)
* Clarify the limits of Active Area per its syntax (#288)
* Clarify handling of foreign elements and attributes (#213)
* Clarify name of IMSC namespaces (#301)
* Use Root Container Region consistently (#302)
* Clarify style resolution procedure (#300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants