Re: Style inheritance in TTML1

On Thu, Jul 16, 2015 at 9:09 AM, Pierre-Anthony Lemieux <pal@sandflow.com>
wrote:

> Hi all,
>
> The following question came up while evaluating a rendering of the
> IMSC1 test at [1], which has the following structure:
>
> ...
> <style xml:id="black_72" tts:color="black"
> tts:fontFamily="proportionalSerif" tts:fontSize="72px"
> tts:textAlign="center"/>
> <style xml:id="white_73" tts:color="white"
> tts:fontFamily="proportionalSansSerif" tts:fontSize="73px"
> tts:textAlign="right"/>
> ...
> <region xml:id="subtitleArea1" style="black_72" tts:origin="100px
> 200px" tts:extent="1024px 690px" tts:padding="5px 5px"
> tts:opacity="0.85" tts:textAlign="center"
> tts:showBackground="whenActive" tts:wrapOption="noWrap"/>
> ...
> <div region="subtitleArea1">
>     <p begin="00:00:00:10" end="00:00:00:13"
> tts:backgroundColor="#97BF0D" style="white_73" tts:wrapOption="wrap"
> tts:fontSize="24px">Start</p>
> ...
> <div>
>
> In which order do white_73 and black_72 get applied to the <p>?
>

black_72 is never directly applied to p (or div or body); it is applied to
the region in which the body/div/p subtree is targeted; so, when resolving
style properties on p, only those inheritable properties not already
assigned to p would be inherited from div, body, and region, in that order;
so only inheritable properties not assigned to p, div, and body would be
inherited from region through the region/body/div ancestors;

Per Section 8.4.4.2 in TTML1, I think I would conclude that inherited
>
styles get applied last (and thus <p> is centered) since [implicit
> inheritance] is the last rule.
>

the resolved textAlign will be right, not center; step 6. (a) of 8.4.4.2:

"if *PINH* is present in the specified style set of *E*, *SSS(E)*, then
continue to the next inheritable style property;"

means that tts:textAlign will not be inherited since tts:textAlign was
already merged from white_73 into SSS(E) in step 2;

you should also review the updated language in TTML2 10.4.4.2 step 6, which
adds missing language that deals with initial value fallback (that was
accidentally omitted in TTML1 [1]);

[1] https://www.w3.org/AudioVideo/TT/tracker/issues/399



>
> Does that sound right?
>
> Thanks,
>
> -- Pierre
>
> [1]
> https://dvcs.w3.org/hg/ttml/file/tip/ttml-ww-profiles/testsuite/dece/Solekai023_1920_23_1x1_MaxHdSubtitle_v7_subtitles/track6-frag0-sample1-subs0.ttml
>
>

Received on Thursday, 16 July 2015 16:24:37 UTC