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

Support styles on TTML #927

Closed
avelad opened this issue Jul 14, 2017 · 9 comments
Closed

Support styles on TTML #927

avelad opened this issue Jul 14, 2017 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@avelad
Copy link
Member

avelad commented Jul 14, 2017

Is it possible to support TTML styles?

tts:backgroundColor = ebuttdt:distributionColorType
tts:color = ebuttdt:distributionColorType
tts:direction = ( 'ltr' | 'rtl' )
tts:fontFamily = As defined in TTML 1.0, section 8.2.8
tts:fontSize = ebuttd:distributionLengthType
tts:fontStyle = ( 'normal' | 'italic' )
tts:lineHeight = ('normal' | ebuttd:distributionLengthType)
tts:fontWeight = ( 'normal' | 'bold' )
tts:textDecoration = ( 'none' | 'underline' )
tts:wrapOption = ( 'wrap' | 'noWrap' )

Specification of EBU-TT-D: https://tech.ebu.ch/docs/tech/tech3380.pdf

Sample with some of this styles: https://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd

More info: http://subtitling.irt.de/ website with dash-if player with previous stream and styled subtitles

@ismena
Copy link
Contributor

ismena commented Jul 14, 2017

We don't do text rendering at the moment, but we might start in the future as part of our UI effort. (We don't have the scope and timeline for that defined yet).

The best answer I can give now is same as with #923. I can make sure we parse these setting in TtmlParser and have them on our internal object representing a text cue once we transition to separate text parsing and display. If you'd like to have a custom text displayer, you'll be able to incorporate the settings.

If writing a custom plugin to display text is something that interests you, I can give you a heads up once the change to make it possible has landed.

@ismena ismena self-assigned this Jul 14, 2017
@ismena ismena added the type: enhancement New feature or request label Jul 14, 2017
@joeyparrish joeyparrish added this to the v2.2.0 milestone Jul 14, 2017
@avelad
Copy link
Member Author

avelad commented Jul 17, 2017

Thanks @ismena. I'm interested on a custom plugin to display styled text. Once it is possible, can you indicate the steps to follow?

@ismena
Copy link
Contributor

ismena commented Jul 17, 2017

@avelad will do! I'm hoping to land the change by the end of this week and I'll follow up with you once it's done.

@avelad
Copy link
Member Author

avelad commented Jul 19, 2017

@ismena, I have seen your commits, but I do not see support for tts:direction = ( 'ltr' | 'rtl' ), is it intentional?

@ismena
Copy link
Contributor

ismena commented Jul 19, 2017

@avelad It seems I confused it with 'tts:writingMode' and though we already had support for it. Now when I look at it actually, I'm not sure I understand what is the significant difference between tts:direction and tts:writingMode.
Would you have any insight?

FYI, we're preparing an upgrade guide for v2.2 which will have details on the new parser/displayer system and the steps to upgrade.

@avelad
Copy link
Member Author

avelad commented Jul 20, 2017

@ismena
Specs:
tts:writingMode --> https://www.w3.org/TR/ttaf1-dfxp/#style-attribute-writingMode
tts:direction --> https://www.w3.org/TR/ttaf1-dfxp/#style-attribute-direction

I think that direction attribute has a direct translation to css with https://www.w3schools.com/cssref/pr_text_direction.asp and writingMode attribute allow the same as direction atribute plus vertical modes.

Some packagers use direction attribute for use in the same stream arabic and english for example.

@avelad
Copy link
Member Author

avelad commented Jul 27, 2017

@ismena do you have any update about my previous comment?

@ismena
Copy link
Contributor

ismena commented Jul 31, 2017

Sorry for the delay, I'll try to address this today.

@ismena
Copy link
Contributor

ismena commented Jul 31, 2017

Okay, done :)
We are now parsing tts:direction attribute into our writingDirection setting.

Let me know if you have any questions!

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants