This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26020 - [WebVTT] Support centering a cue whose lines are not themselves centered
Summary: [WebVTT] Support centering a cue whose lines are not themselves centered
Status: NEW
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
Depends on:
Blocks: 26021
  Show dependency treegraph
Reported: 2014-06-09 15:13 UTC by Philip Jägenstedt
Modified: 2014-06-11 11:44 UTC (History)
2 users (show)

See Also:


Description Philip Jägenstedt 2014-06-09 15:13:36 UTC

Use case: "You have a cue with several short lines and you want their left edges to align. Then you want to position the bounding box of those lines so that it is centered around a fixed point beneath the speaker."
Comment 1 Philip Jägenstedt 2014-06-09 15:19:46 UTC
I had one proposal for this in but I think it would be better with a solution where the correct text-align value is used from the start and only the cue position is adjusted to achieve the same result. Unfortunately I don't know if that's even possible.

It might be a good idea to consult with CSS and SVG experts to see if they've thought about something like this before. SVG has a text-anchor attribute, but it doesn't really do the same thing because it's only for a single line:
Comment 2 nigelmegitt 2014-06-09 15:23:29 UTC
Flagging up that we have the same requirement in TTML, with a proposed mapping to CSS flex box for display purposes [1]. It'd be neat to converge on the mapping for display purposes, though obviously the syntax will be different.

Comment 3 Philip Jägenstedt 2014-06-09 21:50:47 UTC
That's interesting. It looks like one can use e.g. justify-content: flex-end to right-align the content of a flex box. That makes me wrong, because apparently you can do this thing in CSS, which makes me somewhat less skeptical of it.
Comment 4 Philip Jägenstedt 2014-06-11 11:44:51 UTC
When fixing this, don't forget to revisit the maximum size calculation: