-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
sub/osd/console: adjust font sizes #15221
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
This needs to update docs as well |
I know that the stats font size has to remain 20, but maybe the font outlines should be thinned out? If the purpose here is to have visual parity, they look a little thick now in comparison to the rest of the elements. Either that, or the font outlines for everything else (osd, console etc.) should be thicker. |
4aed938
to
7cfc91c
Compare
Done.
Good catch, it was twice as thick. Fixed. |
19cb00e
to
f4d47f9
Compare
For |
I think a larger sub font would be preferred most of the time for readability reasons. I would assume most users treat the subtitles and player OSD as separate things, in which case they're not really expecting consistency. |
I think it's fair to point out that some streaming services use a sub border that is akin to I don't use mpv's default sub styling so I'm not here to block any changes either way. I do agree that the default is too large. |
The purposed value is problematic for both cases:
So I think the console's font size should stay unchanged for now, and if the OSD font size is made smaller, also draw a semi-opaque background to ensure readability. |
Outline sizes could be left at 3 for better readability, that's what I still use with font-size=30. |
We have a fairly large outline to improve readability. I think the readability issue with the "text on text" scenario is somewhat separate from what we're addressing here. I understand that a smaller font may blend better, but under normal circumstances, it remains readable with the current outline value. I actually like the idea of a background box for the OSD, but this falls slightly outside the scope of just "changing font size." It would be a nice QOL addition, but if we go this route, it might be worth designing a more refined style for the OSD "box" rather than just adding a background box.
That's a valid point. The 16:10 aspect ratio works well, in my opinion; 4:3 is indeed too square. I prefer 24 for the console, but since it's the same for
Not all of them though. But I agree background box is ultimate readability.
I think it’s too large. I tested it with various sizes, starting at 2, then 1.8, and finally settling on 1.62, which maintains the same proportional outline size to font size as before. It doesn’t look great when the large outline starts creating a background box effect. EDIT: If we don't want to use the same size everywhere. I'm thinking something like.
|
If everyone else is fine with the sub font being small, then I think keeping both the osd/sub at 30 is fine. As for outlines, I think 8% is an OK compromise between guido's 10% and this PR. Smaller outlines tend to alias on certain displays so I think it's fine (maybe even desirable) if the outline creates a "background box" effect in this case. However, if everyone is moving in the direction of having a |
f4d47f9
to
75b6fc8
Compare
Changes:
|
a53f1a3
to
f25ae7a
Compare
I'll keep my thoughts so far short:
Outside of that I can't really think of anything else. |
This was a quick try at shadow. This needs optimizing and fixing, since for example
I'm not sure if blending looks the same on each platform. But 40% is of course on lower side, might go with 60%. I think I will add small |
This comes from what I use my with my outline size, I guess I should have mentioned it. You want a bigger border size with blur. |
7e16a12
to
afd2f6e
Compare
55% seems reasonable. With the more opaque box, maybe this PR should also bring back the OSC opacity commit? I think it makes sense now to change |
afd2f6e
to
e11021b
Compare
Done. |
e11021b
to
3b6f9c6
Compare
Just a note about subtitle size: subtitles are scaled according to the height of the viewport, depending on the blend-subtitles option. When blend-subtitles=yes, the video height is used, while blend-subtitles=no uses the full height, including black bars. Therefore, subtitles will appear smaller than the OSD if black bars are added and blend-subtitles=yes is set. I think the current size works in both cases, but I can also imagine that some users might want to increase it. Although we won’t find a perfect option for every scenario, my goal is to create something that works well out of the box, meaning it’s "usable" and can be adjusted if needed. |
I tested the osd-shadow profile and the readability is the lowest among all profiles here especially on bright backgrounds, and the performance is horrible due to huge blur radius, resulting in framedrops. Also what's the reason to introduce a default osd blur here? This kind of "glowing text" blur doesn't fit into contemporary design language, and it slows down rendering by ~15% compared to no blur on 1080p screen. On a 4K screen the performance loss would be even higher due to larger blur radius. IMO there should be no blur by default and the osd-shadow profile shouldn't exist. |
3b6f9c6
to
b40f656
Compare
Updated. Like I said before, I don't like the shadow profile either, it would have to be tuned better, it was quick experiment to try it out, because we cannot blur background-box, which would imho be preferable. |
can we start by fixing the font size and then discuss any other possible adjustments? |
b40f656
to
8bfe02b
Compare
Per @sfan5 request, I removed box profiles. EDIT:
It would be best if you tested yourself and see the changes. I'm interested in feedback. |
I plan to, but screenshots are very convenient if I have a spare 5 minutes to look at github. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
i am fine with all the changes. though personally think the new sub font size is way too small. i also don't consider VOD services a good indicator what is good tbh. though coming from an anime fansubber background, sub font sizes are generally chosen fairly big. i would also say usual VOB or PGS subs are a better indication what the size should be. subs should not deviate your attention from what is happening on the screen or rather the most important part the center.
choosing a sub font size also depends on your viewing habits and environment. like TV or PC monitor, distance to screen, sub or dubtitles (support for actual the spoken language or actual translation), etc. i would say the new one totally falls into the too small and not enough relative margin category. anyway, i am not sure if we want to discuss this any further or more extensively. anyone probably has their own preferences in that regard and should have configured appropriate sub setting for themselves (at least i did this myself many years ago). so i am not planning to block this change. just wanted to state my opinion on that and i am fine with what is chosen in the end. [edit] |
It's impossible to make everyone happy, but personally I prefer bigger margins (x and y) and a bit bigger text, and a bit thicker border. The margins are important to have good spacing at the sides. The goal is not to fit as much as possible, but make it comfortable to look at. Though obviously all of those can be very subjective. |
c21f018
to
dcce31c
Compare
please don't misunderstand. i am not trying to start an argument, just trying to answer your questions or give some information/insight. over the past 2 decades i read many documents about that topic and a lot of the information is just stuck in my head and i might not be able to cite the source anymore. it is fine to disagree.
i am of the opinion, just because it is supposedly the "majority" doesn't make it more right. there is also more the lack of the consumer to actively care about subtitles. here we have to also keep in mind, subtitles existed way before VOD (so majority is time relative here i would say). many VOD services broke with some regular accepted subtitles rules and many subtitles were just an afterthought. in comparison the BBC conducted several surveys and wrote several white papers about subtitling over the decades. they probably started when teletext was invented and used for subtitling TV broadcasts. this document (https://www.bbc.co.uk/accessibility/forproducts/guides/subtitles/) answers many questions, like size (line height 8% of the height of the video, 720p > 57.6), legibility, subtitle consumer ratios (10% broadcast 35% on some online content), etc. it got many revisions over the decades and isn't really in the state it was when i first came about it. though still think many of the informations are relevant and do have a certain 'scientifically' value.
totally true and unfortunate. the good old (yellow) DVD VOB subs had a way bigger outline. this got kinda changes with the advent of PGS subs/higher resolutions. the BBC for example recommends a background instead of an outline (that as a side note and probably because of the limitations of teletext). on more modern/newer subtitles this was adapted to be a thicker outline and/or shadow, to make the subs pop out more/make them more legible on different backgrounds.
sorry if i misunderstand this statement. there are long arguments about hard- and soft line breaks (render decides where to break). though in general, if you use something like ASS/PGS/VOB subtitles it's fine to use hard line breaks, since your subtitles are not supposed to change relative size (size is fixed and scaled). though for something like SRT where the size is configurable hard line breaks are disadvantageous. this can lead to unwanted line breaks. as an example a line with two lines could turn into a three liner (three lines are discouraged) when sizes of the subs increased, when a hard line break is used.
i don't think all of this is subjective. with many things it's a mix of both (or not everything is black and white) and how much the individual person cares. i think the resources i linked are a good start and some objectives measures can be extracted from. |
It's fine, I value your input on the topic.
This was bad wording, what I in-fact meant it is highly dependent on user viewing environment and on-top of that there are also personal preferences.
I just want to start with saying that teletext subtitles are inherently limited in its rendering, and with that out of the way. I think it is disingenuous to quote only this value, as it is even not what we are suppose to use. This is the MAX authoring size of the subtitles.
Note that I'm targeting normal sized devices, not mobile phones, that would be the job for mpv-android. Looking at this table, we see that the recommended range is 0.5 to 1.0 (>28.8), with values of 0.6 (34.56) for desktop PCs and 0.67 (38.592) for 32"-42" TVs. Note that 32"-42" TVs are very small by today’s standards. If we take a value of 0.6, then 0.6 * 57.6 = 34.56, which is close to my initial suggestion of 32. This also matches what YouTube uses for their subtitles, indicating that VOD platforms do follow certain guidelines. Initially, I wanted the same font sizes for OSD and SUB, which is why SUB ended up being smaller. I realize now that this doesn’t work well, as having the same size for both isn’t effective. OSD shouldn't be as large as SUB. After reviewing these recommendations, we could even consider a size range of 38-40 instead of 42, which still feels a bit large, in my opinion. Side note. Public broadcasters from my region is providing both teletext and dvbsubs. And it is quite obvious why teletext is nominally quite big and the dvbsubs have more reasonable size. (and still suppose to be scaled) (ignore encoding issue, zvbi doesn't detect correct encoding) As we can see, teletext font rendering limitations pushes some decisions on size... (And yes, our current size (this pr) is similar to dvbsub, though more flat) |
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.
It is 5.5% of font size.
dcce31c
to
0f44a32
Compare
sry totally my bad, this was misleading. i didn't mean it as an answer for our problem specifically but rather the answer/reason why they decided on that size. i thought i would go a bit overboard quoting everything.
sry, i didn't mean to imply they don't do that at all.
since it's is also recommended to adjust your viewing distance according to the size (and resolution of content) you are viewing, the size shouldn't matter that much in that regard. but yeah in practice most wouldn't really do that and they have a 'fixed' distance (i am probably an oddball) and then the size matters. also a reason why there is a recommended range.
i always read those tables, infos and recommendations the other way around. eg start with the largest multiplier as default (x1) and make the rest user adjustable by the recommended range. the recommended multiplier always seemed like a value they decided on by assuming certain things (not criticising this decision, they have to assume certain things) that are in the hand of the user itself, like viewing distance, content viewed (which can be related to the viewing distance), etc. differently said, all devices are 'unknown' devices since their relative size is dependent on the viewing distance. anyway or rather some rambling, decreasing the size is less likely to break something (see line break example above) than increasing. so in my mind i always start at the biggest size recommended. TLDR |
No description provided.