sub/osd/console: adjust font sizes

The current OSD font size is excessively large, causing most
messages—except for very short ones to overflow horizontally.

I conducted testing across multiple devices of varying screen sizes and
under different scenarios. The adjusted font size strikes a good balance
for readability on non-high-DPI displays, while high-DPI displays should
utilize DPI scaling as needed.

Additionally, I compared the font sizes of subtitles and UI elements
across various VOD platforms, which generally use smaller font in most
cases.

The current sub font size was significantly larger than even PGS
subtitles, which are quite large on their own. Now, they are comparable.

The subtitle font size was chosen based on recommendations from the BBC
Subtitle Guidelines. It is set to 8% of the video height with a
recommended scaling factor of 0.67. Therefore, at 720p (the reference
size for mpv font scaling), the calculation is 8% * 0.67 * 720 = 38.592,
rounded down to 38. This value falls within the recommended scaling
range of x0.5–x1 for desktop PCs/Laptops and TVs (32"–42"). For more
information, see
https://www.bbc.co.uk/accessibility/forproducts/guides/subtitles/#Presentation-font-size.

OSD font size is smaller than font as those elements shouldn't be
distractful and only noticable when the user wants to look at them.

Outline size is set to 5.5% of font size.
This commit is contained in:
Kacper Michajłow 2024-10-29 21:38:55 +01:00 committed by sfan5
parent e8fd7b8798
commit 8c3a7da619
4 changed files with 18 additions and 18 deletions

View File

@ -164,7 +164,7 @@ Configurable Options
the window.
``border_size``
Default: 1.5
Default: 1.32
Set the font border size used for the REPL and the console.

View File

@ -2897,7 +2897,7 @@ Subtitles
height: if the window height is larger or smaller than 720, the actual size
of the text increases or decreases as well.
Default: 55.
Default: 38
``--sub-blur=<0..20.0>``
Gaussian blur factor applied to the sub font border.
@ -2925,7 +2925,7 @@ Subtitles
``--sub-border-size`` is an alias for ``--sub-outline-size``.
Default: 3.
Default: 2.09
``--sub-border-style=<outline-and-shadow|opaque-box|background-box>``
The style of the border.
@ -2986,7 +2986,7 @@ Subtitles
This option specifies the distance of the sub to the left, as well as at
which distance from the right border long sub text will be broken.
Default: 25.
Default: 19
``--sub-margin-y=<size>``
Top and bottom screen margin for the subs in scaled pixels (see
@ -2995,7 +2995,7 @@ Subtitles
This option specifies the vertical margins of unstyled text subtitles.
If you just want to raise the vertical subtitle position, use ``--sub-pos``.
Default: 22.
Default: 34
``--sub-align-x=<left|center|right>``
Control to which corner of the screen text subtitles should be
@ -4456,7 +4456,7 @@ OSD
``--osd-font-size=<size>``
Specify the OSD font size. See ``--sub-font-size`` for details.
Default: 55.
Default: 30
``--osd-msg1=<string>``
Show this string as message on OSD with OSD level 1 (visible by default).
@ -4573,7 +4573,7 @@ OSD
``--osd-border-size`` is an alias for ``--osd-outline-size``.
Default: 3.
Default: 1.65
``--osd-border-style=<outline-and-shadow|opaque-box|background-box>``
See ``--sub-border-style``. Style used for OSD text border.
@ -4601,7 +4601,7 @@ OSD
This option specifies the distance of the OSD to the left, as well as at
which distance from the right border long OSD text will be broken.
Default: 25.
Default: 15
``--osd-margin-y=<size>``
Top and bottom screen margin for the OSD in scaled pixels (see
@ -4609,7 +4609,7 @@ OSD
This option specifies the vertical margins of the OSD.
Default: 22.
Default: 15
``--osd-align-x=<left|center|right>``
Control to which corner of the screen OSD should be

View File

@ -31,7 +31,7 @@ local platform = detect_platform()
local opts = {
font = "",
font_size = 24,
border_size = 1.5,
border_size = 1.32,
scale_with_window = "auto",
case_sensitive = platform ~= 'windows' and true or false,
history_dedup = true,

View File

@ -81,15 +81,15 @@ const struct m_sub_options osd_style_conf = {
.size = sizeof(struct osd_style_opts),
.defaults = &(const struct osd_style_opts){
.font = "sans-serif",
.font_size = 55,
.font_size = 30,
.color = {255, 255, 255, 255},
.outline_color = {0, 0, 0, 255},
.back_color = {240, 240, 240, 128},
.border_style = 1,
.outline_size = 3,
.outline_size = 1.65,
.shadow_offset = 0,
.margin_x = 25,
.margin_y = 22,
.margin_x = 15,
.margin_y = 15,
.align_x = -1,
.align_y = -1,
},
@ -101,15 +101,15 @@ const struct m_sub_options sub_style_conf = {
.size = sizeof(struct osd_style_opts),
.defaults = &(const struct osd_style_opts){
.font = "sans-serif",
.font_size = 55,
.font_size = 38,
.color = {255, 255, 255, 255},
.outline_color = {0, 0, 0, 255},
.back_color = {240, 240, 240, 128},
.border_style = 1,
.outline_size = 3,
.outline_size = 2.09,
.shadow_offset = 0,
.margin_x = 25,
.margin_y = 22,
.margin_x = 19,
.margin_y = 34,
.align_x = 0,
.align_y = 1,
},