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

Scale font size with window size #32

Open
Argon- opened this issue Feb 17, 2017 · 4 comments
Open

Scale font size with window size #32

Argon- opened this issue Feb 17, 2017 · 4 comments

Comments

@Argon-
Copy link

Argon- commented Feb 17, 2017

I'm wondering why this isn't done, I assume it's on purpose?
The font size will stay "the same" when resizing the window, therefore it looks like I have a really small font when e.g. in fullscreen and it all looks really big when I have a small, windowed window. For this reason, the OSC scales with your window size.
Can this somehow be activated?

@torque
Copy link
Owner

torque commented Feb 18, 2017

The size of text in my browser window/terminal/text editor doesn't scale with window size. I find the idea of scaling the UI with window size to be insane and completely counterintuitive to how all other program UI works, and it's one of the reasons I really don't like the built-in OSC (though I understand it needs to do it to ensure the controls are always visible).

That said, I'm not completely opposed to having this as an option, but I don't think the way that the OSC does it will work for this script. It appears to do some math based on the fixed geometry size of the OSC and sets scale based on the proportion of that to the window size. This script has no fixed aspect ratio because it is designed to flex with the window size rather than the video size.

A possible solution would be to scale the text around the ratio of the window height to some virtual datum, which would result in a constant text size for a given height. I'm not sure how well this strategy would play with varying aspect ratios.

I'll think about it.

@Keith94
Copy link

Keith94 commented Feb 22, 2017

I'd also like to see this as an option; without scaling, the text is too big and covers up subtitles.

@Argon-
Copy link
Author

Argon- commented Feb 23, 2017

That's what I was wondering about: all the other text scales. Subtitles, text drawn and ASS-styled with osd_message, they all scale automatically due to the way libass is used.
This script is using regular ASS tags for font size as well but it doesn't scale? I guess that's a result of using mpv's assdraw?

@torque
Copy link
Owner

torque commented Feb 23, 2017

I'd also like to see this as an option; without scaling, the text is too big and covers up subtitles.

I find this to be an odd problem. The expected use is that the UI remains hidden except when it is requested to be displayed (or used to seek), so the UI shouldn't really be on the screen long enough to interfere with subtitle viewing. My immediate suggestion is to simply reduce the font size in your config.

e: an alternate solution in the case of very low resolution videos (which I'll admit mpv-progressbar does not handle gracefully) is to use mpv's autofit-smaller setting to enforce a default minimum window size.

That's what I was wondering about: all the other text scales. Subtitles, text drawn and ASS-styled with osd_message, they all scale automatically due to the way libass is used.

It's done explicitly (here, for reference) for the reasons I listed above. This script tries to be a basic user interface, and those almost never scale with window resolution (nor, I believe, should they). The way the UI is composed shouldn't matter.

While I don't agree with this issue on a philosophical level, I don't have a problem with implementing it provided I can find a satisfactory way to do so. Unfortunately, I am unlikely to have time to put much thought into this for the next few months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants