This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25632#c25 https://www.w3.org/Bugs/Public/show_bug.cgi?id=25632#c27 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."
I had one proposal for this in https://www.w3.org/Bugs/Public/show_bug.cgi?id=25632#c27 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: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor
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. [1] https://www.w3.org/wiki/TTML/changeProposal015#multiple_row_alignment_.28flex_box_in_CSS_mapping.29
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.
When fixing this, don't forget to revisit the maximum size calculation: https://github.com/w3c/webvtt/pull/105#issuecomment-45603644