Skip to content

Conversation

NhanNguyen700
Copy link
Contributor

Hi @asticode ,

Style and region for ttml can be specify in body and div too, please refer to testdata/example-in-style-inheritance.ttml to see the real case. Style/region will be inherited by this order body>div>p.

Besides, according to TTML standard, when both parent node and child node define style/region, the one in child node will win. Thus, I implement an override mechanism in your TTML parsing step to bring all the style/region from parent node down to the item (

<\p>) node if there is no corresponding attribute in the child node. With that, the "Subtitles" object structure will not be broken and the style/region can be preserved. The side-effect is that the output TTML can be a little bit longer compare to input TTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant