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

Improve support for Japanese subtitles #2853

Closed
avelad opened this issue Sep 17, 2020 · 3 comments
Closed

Improve support for Japanese subtitles #2853

avelad opened this issue Sep 17, 2020 · 3 comments
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@avelad
Copy link
Member

avelad commented Sep 17, 2020

Is it possible to add the following in TTML and WebVTT?

  • Vertical text with tate-chū-yoko
  • Rubies

WebVTT uses the vertical cue setting and HTML-style <ruby> & <rt> tags. The ruby position can be controlled using the ruby-position CSS property and tate-chū-yoko is enabled with the text-combine-upright CSS property.

WEBVTT

STYLE
::cue(.combine) { text-combine-upright: all; }

00:00:01.000 → 00:00:04.000 vertical:rl line:5%
グーグルは<c.combine>1998</c>年に<ruby>創業<rt>そうぎょう</rt></ruby>しました

00:00:05.000 → 00:00:08.000 line:90%,end
グーグルは1998年に<ruby>創業<rt>そうぎょう</rt></ruby>しました

TTML uses the tts:writingMode region attribute to control vertical text, and tts:ruby and tts:rubyPosition span attributes. Tate-chū-yoko is enabled with the tts:textCombine span attribute.

<tt 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:ttm="http://www.w3.org/ns/ttml#metadata"
    xmlns:xml="http://www.w3.org/XML/1998/namespace">
<head>
  <layout>
    <region
      xml:id="vert_right" 
      tts:extent="100% 100%" tts:origin="2% 5%"
      tts:writingMode="tbrl"/>
    <region 
      xml:id="bottom"
      tts:extent="100% 100%" tts:origin="0% 40%"
      tts:displayAlign="center"/>
  </layout>
</head>
<body>
  <div>
    <p begin="00:00:01.000" end="00:00:04.000" region="vert_right">グーグルは<span tts:textCombine="all">1998</span>年に<span tts:ruby="container"><span tts:ruby="base">創業</span><span tts:ruby="text">そうぎょう</span></span>しました</p>
    <p begin="00:00:05.000" end="00:00:09.000" region="bottom">グーグルは1998年に<span tts:ruby="container"><span tts:ruby="base">創業</span><span tts:ruby="text">そうぎょう</span></span>しました</p>
  </div>
</body>
</tt>

Source and more examples:

@TheModMaker TheModMaker added component: captions/subtitles The issue involves captions or subtitles type: enhancement New feature or request and removed needs triage labels Oct 2, 2020
@TheModMaker TheModMaker added this to the Backlog milestone Oct 2, 2020
@avelad
Copy link
Member Author

avelad commented Mar 10, 2021

@ismena ismena added the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label Mar 11, 2021
@ismena
Copy link
Contributor

ismena commented Mar 11, 2021

Damn, Asian languages are cool!

This isn't a priority for the team at the moment, but we'd gladly accept a PR.

@TheModMaker TheModMaker added the priority: P3 Useful but not urgent label Sep 29, 2021
avelad added a commit that referenced this issue Sep 12, 2023
avelad added a commit that referenced this issue Sep 12, 2023
avelad added a commit that referenced this issue Sep 13, 2023
@avelad avelad removed the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label Sep 13, 2023
@avelad avelad modified the milestones: Backlog, v4.5 Sep 13, 2023
@avelad
Copy link
Member Author

avelad commented Sep 13, 2023

All functionality has been merged in following PRs:
#5633
#5642
#5644
#5645

@avelad avelad closed this as completed Sep 13, 2023
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Nov 12, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P3 Useful but not urgent 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