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

[WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control #550

Open
himorin opened this issue May 8, 2020 · 4 comments
Open

Comments

@himorin
Copy link
Contributor

himorin commented May 8, 2020

Per: w3c/ttwg#116
Comment 3 (#545), 5

ARIB-TTML has the attributes to enhance its presentation capability. The “arib-tt:border” attribute specifies the border appearance of the region defined by an element such as div, p, and span. Similarly, the “arib-tt:marquee” attribute for scrolling a text, the “arib-tt:ruby” for ruby, the “arib-tt:letter-spacing” for manipulation of letter spacing, and “arib-tt:text-shadow” for controlling text shadow are available.

@nigelmegitt
Copy link
Contributor

This looks like it might benefit from some close analysis (that I don't have time to do right now!) of the differences between the ARIB-TTML styling capabilities, those in TTML2 and those in HTML+CSS.

@css-meeting-bot
Copy link
Member

The Timed Text Working Group just discussed [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550, and agreed to the following:

  • SUMMARY: More work needed to understand any semantic differences between similar features in ARIB-TT and TTML2
The full IRC log of that discussion <nigel> Topic: [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550
<nigel> github: https://github.com//issues/550
<nigel> Nigel: I commented that I think some analysis could be helpful. Any other thoughts?
<nigel> Pierre: I have not had time to carefully study that one.
<nigel> .. On letter spacing, I have actually had the opportunity to spend a lot of time on it.
<nigel> .. My understanding is that the exact same issue is present in digital cinema.
<nigel> .. Letter spacing is really important in all languages. The practice, in DC, is not to handle
<nigel> .. letter spacing in the font file itself, but to handle it at the markup level. I do not know why.
<nigel> .. Japanese cinema subtitles also allow precise letter spacing. This was a feature requested
<nigel> .. for TTML2 and ultimately rejected.
<nigel> .. The author will adjust kerning while authoring in their tool, and this will be reflected in
<nigel> .. the markup. I have asked many times why this couldn't be done in the font, especially
<nigel> .. since in the case of cinema a dedicated font file is provided with Japanese subtitles.
<nigel> .. I have never received an answer.
<nigel> .. I could understand if you could not provide a font file, I would say okay, it has to be
<nigel> .. handled as part of the markup, but if a bespoke font file is provided why not use that.
<nigel> Nigel: Do you know if there is a use case for different kerning between the same characters
<nigel> .. in different parts of the same presentatoin?
<nigel> s/oin/ion
<nigel> Pierre: I did ask precisely that and did not get an answer.
<nigel> Gary: I wonder if this is partially something to do with direction of text, where particularly
<nigel> .. in Japanese you want to adjust it more because if you adjust it one way then the other
<nigel> .. way will be wrong, too large or too small. I'm not sure how often that is actually the case
<nigel> .. for captions but it could happen on the web.
<nigel> Nigel: Is there CSS for this?
<nigel> Gary: Yes, letter-spacing property
<nigel> .. It just takes a length
<nigel> Nigel: In the context of the web, specifying this is current practice.
<nigel> .. It's in CSS 1, SVG, CSS 2.1. There's also font-kerning, which sets the use of the kerning
<nigel> .. information held within the font.
<nigel> .. That's in CSS Fonts Level 3 CR
<nigel> .. I don't remember why we rejected this in TTML2.
<nigel> Pierre: [looks for it] It's #52.
<nigel> Nigel: Also #118
<nigel> Nigel: I see #52 came from the tracker, was raised there by Pierre and originated in a SMPTE liaison.
<nigel> .. And then #118 was also from the tracker, raised by Glenn, and originated in ARIB-TT.
<nigel> .. So we have seen this before, but there's no record of it.
<nigel> .. I see that we did add tts:letterSpacing! So this is resolved.
<nigel> Pierre: Please correct my earlier statement - letterSpacing is in TTML2.
<nigel> Nigel: Now what I want to know is what is different about ARIB-TT's letter spacing from what
<nigel> .. we have in TTML2?
<nigel> SUMMARY: More work needed to understand any semantic differences between similar features in ARIB-TT and TTML2

@css-meeting-bot
Copy link
Member

The Timed Text Working Group just discussed [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550 [continued].

The full IRC log of that discussion <nigel> Topic: [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550 [continued]
<nigel> github: https://github.com//issues/550
<nigel> Pierre: I recall that letter spacing is not supposed to be used on a character by character basis.
<nigel> .. ipd is supposed to allow character by character adjustment, and it is specified not to be
<nigel> .. negative in TTML2. So I'm 99% certain that the ARIB-TT feature maps to ipd not letterSpacing.
<nigel> .. We need to study this in more detail but I wanted to add this for the record.

@css-meeting-bot
Copy link
Member

The Timed Text Working Group just discussed [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550, and agreed to the following:

  • SUMMARY: There are some overlaps and some gaps between the ARIB-TT styling attributes and those in TTML2. We are interested to know more about the usage, especially where there are gaps in TTML2.
The full IRC log of that discussion <nigel> Topic: [WR/ARIB] Compatibility with ARIB-TTML / 5. Additional style control imsc#550
<nigel> github: https://github.com//issues/550
<nigel> Pierre: Can we come back to the character space question?
<nigel> .. If I'm not mistaken ARIB-TT letter spacing is to control the space between individual
<nigel> .. letters, positive and negative. The TTML2 feature tts:letterSpacing is intended to be applied
<nigel> .. to a sequence of characters to grow or shrink the space between characters overall, rather
<nigel> .. than between individual characters. For that there is tts:ipd, but that does not support
<nigel> .. negative values.
<nigel> .. We should confirm that ARIB's use of letter spacing is for individual character pairs.
<nigel> Nigel: Is there anything to stop you using TTML2 tts:letterSpacing and putting 2 characters
<nigel> .. in it though?
<nigel> Pierre: Imagine you have 3 characters and you want to change the spacing between each of
<nigel> .. the two pairs. You can't do that with tts:letterSpacing.
<nigel> Nigel: This is bringing back nasty memories
<nigel> Pierre: I'm fairly certain we concluded that we could not support controlling negative
<nigel> .. spacing between pairs of letters independently.
<nigel> .. The reason I remember this is that the request came from Digital Cinema originally
<nigel> .. where there is something like IPD that supports negative values. I think that may have
<nigel> .. been introduced specifically to support the Japanese market.
<nigel> Cyril: If you're nesting spans and changing the letterSpacing at each span level would it
<nigel> .. disallow you from controlling the spacing between each pair?
<nigel> Pierre: Right, but in a long sentence you end up with a terrible hierarchical structure.
<nigel> Cyril: I know!
<nigel> Nigel: I don't remember the answer but I remember asking if letterSpacing applies to the
<nigel> .. distance between the last character of the previous span and the first character of the
<nigel> .. span with letterSpacing set, or conversely at the end.
<nigel> Pierre: I'm still struggling to understand why the right solution is not to handle bespoke
<nigel> .. spacing in the font itself.
<nigel> Nigel: It's orthogonal though, you might want to change the letter spacing for one instance
<nigel> .. of a word only, e.g. the word WAVE in the TTML2 example. You can still do it on the font as well, for all uses.
<nigel> Pierre: That would be the perfect use cases, for artistic purposes, where there is an exceptional
<nigel> .. reason, negative IPD could be really helpful. But the reality might be that people would
<nigel> .. use it between every character, which is what I've seen in digital cinema, which defeats
<nigel> .. the purpose entirely, in my mind.
<nigel> Nigel: [wonders aloud about ipd or letterSpacing on empty spans]
<nigel> Pierre: ipd is really simple, that's done I think.
<nigel> Cyril: What happens if you set an ipd that is smaller than the calculated ipd? Does it limit
<nigel> .. the dimension?
<nigel> Pierre: Say that again?
<nigel> Cyril: Say you have a span, and you want to reduce the advance on the last character.
<nigel> .. You add tts:ipd to that span whose value is less than the sum of the advances of all the
<nigel> .. characters in that span.
<nigel> Pierre: That depends on the font, right?
<nigel> Cyril: Sure, yes.
<nigel> .. And if you combine letterSpacing and ipd?
<nigel> Pierre: This might be a really good discussion to have with ARIB, if they're willing to have a
<nigel> .. technical discussion.
<nigel> Nigel: Let's log that and see if we can look at the other attributes.
<nigel> .. They are border, marquee, ruby and text-shadow.
<nigel> .. We have some of these.
<nigel> .. We certainly have textShadow, but I haven't had chance to check if it is the same.
<nigel> .. OK looking in the English translation, the ARIB version has offset-x, offset-y, blur-radius and color.
<nigel> .. Checking TTML2, it is exactly the same.
<nigel> Pierre: Good news, I guess.
<nigel> Nigel: I think so.
<nigel> .. OK let's look at the next one...
<nigel> .. marquee is probably easy: I don't think we have that in TTML2. It does what you would think,
<nigel> .. specifying text scrolling.
<nigel> .. I recall Glenn wondering if there was some use case for animation where the same
<nigel> .. effect could be synthesised but I don't think he ever demonstrated it.
<nigel> .. I see we have w3c/ttml3#2
<nigel> Pierre: It would be good to see what effect they are looking for.
<nigel> Nigel: Agreed, and also to get some usage data.
<nigel> .. There are two more: border and ruby
<nigel> .. Looking at border.
<nigel> .. In ARIB, it is < border-style>, <border-width> and <border-color>
<nigel> .. There are lots of styles, including double, groove, ridge, inset, outset, dashed, dotted, none and hidden.
<nigel> .. In TTML2 we have none, dotted, dashed, solid and double.
<nigel> .. So for this one it looks like there may be a couple of styles they have defined, but the
<nigel> .. overall syntax and semantics are similar. TTML2 has a border-radius which ARIB does not
<nigel> .. have.
<nigel> .. Let's look at ruby:
<nigel> .. The ARIB ruby attribute is an xml:id of the content which is subject to the ruby being
<nigel> .. defined, presumably in a span with the ruby attribute.
<nigel> .. This is a simpler model than in TTML2, but does not describe alignment, position or reserved space.
<nigel> Pierre: I'm fairly confident that TTML2 does a really good job with ruby, modulo the hanging
<nigel> .. issues, the complex ones. Overall I think there should be no deltas there.
<nigel> Nigel: There are deltas, both in syntax and in functionality, but on this one TTML2 has more functionality.
<nigel> Pierre: I would think that TTML2 is a superset.
<nigel> Nigel: The one thing we don't have is infinite levels of nesting of ruby, in TTML2.
<nigel> .. ARIB's solution does support that.
<nigel> Pierre: I think there's an issue for that. We might want to ask if nested rubys are useful
<nigel> .. in subtitles and captions.
<nigel> Nigel: Yes.
<nigel> .. I think we've iterated through all the ARIB attributes now.
<nigel> .. For this issue, I think we can describe the overlaps and gaps in functionality but really
<nigel> .. what we're interested in asking ARIB is about the usage.
<nigel> Pierre: Yes
<nigel> SUMMARY: There are some overlaps and some gaps between the ARIB-TT styling attributes and those in TTML2. We are interested to know more about the usage, especially where there are gaps in TTML2.

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

3 participants