Scale min font size for subtitles in PiP according to the OS settings
Categories
(Toolkit :: Picture-in-Picture, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: asafko, Assigned: niklas)
References
Details
(Whiteboard: [fidefe-MR1-2022])
Attachments
(1 file)
User Story 1
As a user who sets display scaling larger than the default, I want my choice to be respected in the PiP window captions size.
Acceptance Criteria
Windows
- PiP captions size is adjusted if a user chooses a larger scale in Settings - Display - Scale and Layout - Scale.
This already works in Nightly 99 on Win 10.
macOS
- PiP captions size is adjusted if a user chooses a larger scale in System Preferences - Display - Scaled Resolution - Large (r) Text.
This already works in Nightly 99 on macOS 11.6.
Linux
- PiP captions size is adjusted if a user chooses a larger display/resolutions scale in GUI settings.
Behavior on PiP window resizing
- PiP window caption uses the user OS setting as minimum font size and follows the same scaling guidelines on PiP window resizing.
User Story 2
As user, who wants to change their font size in PiP, I want to be able to switch between "small", "medium", and "large" values.
Acceptance Criteria
- media.videocontrols.picture-in-picture.display-text-tracks.font-size allows for three values: "small", "medium", and "large".
- This pref defaults to medium in all use cases aside from when OS-level settings are set to a large font option.
Not doing:
macOS
PiP captions inherit the font size set in System Preferences - Accessibility - Captions - Large Text.
Windows
- PiP captions inherit the size set in Settings > Accessibility > Text size as a min font size.
We decided to do this even though we normally only respect this setting for UI.
In this scenario, about:config setting for subtitles font size defaults to "large".
Linux
- PiP captions inherit the font size set in Activities - Accessibility - Seeing - Large Text.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
I can't find a way to make this change just in CSS; I think we'll have to port the font size math to JS before we can do this. The problem is that we need to take the value we're computing to use right now (or a differently scaled version of it rather), which is in units of vh
, and multiply that by whatever the current default font size is, in units of px
or %
or something else like that. And CSS doesn't have a way to multiply a unit by another unit; one side of any multiplication is required to be unitless. So I think we'll need to add a bit of JS that runs on window resize in order to do those unit conversions.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Comment 4•3 years ago
|
||
bugherder |
Description
•