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

Default font size 5vh leads to very large cues for vertical videos #522

Open
jernoble opened this issue Nov 9, 2023 · 6 comments
Open

Comments

@jernoble
Copy link

jernoble commented Nov 9, 2023

The spec currently says:

The font shorthand property on the (root) list of WebVTT Node Objects must be set to 5vh sans-serif.

This value of 5vh leads to unreasonably large cues for vertical videos. See example here: http://jernoble.github.io/samples/bin/WebVTT/resize-aspect.html

Instead, the spec could use 5vmin (or actually, move away from redefining viewports entirely and use 5cqmin instead). The example above allows you to switch between 5vh and 5vmin to see the difference in behavior.

@jernoble
Copy link
Author

jernoble commented Nov 9, 2023

Screenshot 2023-11-09 at 3 57 42 PM

webkit-commit-queue pushed a commit to jernoble/WebKit that referenced this issue Dec 5, 2023
…rtrait view

https://bugs.webkit.org/show_bug.cgi?id=265817
rdar://118030141

Reviewed by Simon Fraser.

When a landscape video is presented in portrait mode (with large letterboxes), this causes the font size of the
associated text tracks to be absurdly large. Filed a spec issue on WebVTT (w3c/webvtt#522)
to change the default font size be `5vmin` rather than `5vh`, but proceeding with changing WebKit's default
font size to be `5cqh` in the meantime.

* Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css:
(::-webkit-media-text-track-region):

Canonical link: https://commits.webkit.org/271536@main
@nigelmegitt
Copy link
Contributor

vmin seems like the appropriate smallest change to fix the issue here.

@nigelmegitt
Copy link
Contributor

Additional thought for consideration: should it depend on the text direction?

@himorin
Copy link
Contributor

himorin commented Jun 20, 2024

Additional thought for consideration: should it depend on the text direction?

Even with vertical writing text, the same absolute font size as horizontal one should be used, I suppose. Since, question should be what size of characters to be used for CC - even if it is vertical-set or horizontal-set, vertical-set text of CC in vertical video should have the same logic as horizontal-set text of CC in horizontal video, and for reverse. If we change to vmin, which is defined as minimum of vh or vw, I'd say that change considers both vertical-set or horizontal-set in the same priority.

@nigelmegitt
Copy link
Contributor

Thanks @himorin , that makes sense: no dependency on the text direction, just the orientation of the video.

@gkatsev
Copy link
Collaborator

gkatsev commented Sep 24, 2024

This seems reasonable to me.

Using 5cqmin also sounds reasonable. In this case, would we want to have a fallback of 5vmin in case container queries aren't implemented?

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

No branches or pull requests

4 participants