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

Timeline font size in version 5.0.0 #722

Closed
LampPrinter opened this issue Oct 21, 2023 · 19 comments
Closed

Timeline font size in version 5.0.0 #722

LampPrinter opened this issue Oct 21, 2023 · 19 comments

Comments

@LampPrinter
Copy link

iShot_2023-10-21_17 19 43

Please see the attached photo. The font size in previous version of UOSC was larger.
I only see "font_scale=1" which makes all text bigger including title etc. which I do not want.

@tomasklaen
Copy link
Owner

This should fix it. If you could test what's on main, refer back if it doesn't.

@LampPrinter
Copy link
Author

LampPrinter commented Oct 21, 2023

Yes it fixed it.
Another issue, all the text now has a dark background. Whereas earlier it was not like this.
Am I missing some setting in uosc.conf?

195072935-44d591d9-00bb-4a55-8795-9cf81f65d397

@tomasklaen
Copy link
Owner

Related: #636

You can disable it with the new opacity option.

@bananakid
Copy link

@tomasklaen would you kindly tell if there's a way to set semi-transparent background for Controls? I've tried opacity=controls=0.5 and it didn't work while opacity=timeline=0.5 worked fine for Timeline.

@tomasklaen
Copy link
Owner

Controls don't have a background. But it wouldn't be a problem to add it now that we have the opacity option. I'll add it to a to-do list.

@bananakid
Copy link

@tomasklaen, thank you for support!

@bananakid
Copy link

bananakid commented Oct 28, 2023

@tomasklaen, by the way it appears to me that Volume doesn't respect volume_border=0 in 5.0.0, I can make the border thicker but it retains thin black line even if zero is specified in uosc.conf. I figured it's due to slider_gauge being one pixel smaller than the slider. I didn't figure it out at first because slider and slider gauge in opacity options aren't marked to be volume-related. Another small issue is when milliseconds are enabled in Timeline the time indicator on the right keeps moving. These are minor complains, nothing to worry about.

@christoph-heinrich
Copy link
Contributor

the opacity of the progress bar when timeline_style=bar doesn't respect opacity=timeline=0.3 value specified in uosc.conf.

opacity=position=0.3

@bananakid
Copy link

@christoph-heinrich, thanks, I've edited the initial comment since I figured how some of the things work (position was among them). Would you kindly tell if it's possible to set the color and opacity of the indicator that appears when you hover mouse cursor on the Timeline? It looks like a thin vertical line in full height of timeline right where the cursor is pointing.

@christoph-heinrich
Copy link
Contributor

christoph-heinrich commented Oct 28, 2023

Another small issue is when milliseconds are enabled in Timeline the time indicator on the right keeps moving

That is because it's not a monospace font. It's mostly stationary because numbers seem to effectively be monospace, however when they contain 11 it takes up slightly less space then any other combination for some reason, which is why it moves a little bit.
At least that's the case for me, maybe it's different with other fonts/font renderers.

We could set a monospace font for timecodes, but then they look out of place compared to the rest of the UI.
I'm sure there are proportional and monospace font combinations where it wouldn't look out of place, but that depends a lot on your system and configuation. We'd have to ship our own fonts to make sure they match.

@christoph-heinrich
Copy link
Contributor

Would you kindly tell if it's possible to set the color and opacity of the indicator that appears when you hover mouse cursor on the Timeline? It looks like a thin vertical line in full height of timeline right where the cursor is pointing.

As color it uses the foreground or background color, depending on if it's on the position indicator or the timeline background, and the opacity is currently not configurable.

@bananakid
Copy link

bananakid commented Oct 28, 2023

That is because it's not a monospace font.

Yeah, I guess I'll just stick with destination_time=total for now. However I remember it's possible to make any font fixed-width via CSS, maybe Lua has something similar to offer.

As color it uses the foreground or background color, depending on if it's on the position indicator or the timeline background, and the opacity is currently not configurable..

Thank you for taking time to look into it, I changed the opacity forcefully to 1 in Timeline.lua for the time being. I believe it's a good candidate for extending opacity!

By the way I think English wording on the idle screen is a bit incorrect, perhaps it should say Drop files or URLs here to play…

@christoph-heinrich
Copy link
Contributor

christoph-heinrich commented Oct 28, 2023

However I remember it's possible to make any font fixed-width via CSS, maybe Lua has something similar to offer.

That's not directly possible. We could position and draw each symbol individually to make it semi monospace (I don't think : and . should take up as much space as digits), but I don't know if we want to do that (I lean towards no).

@bananakid
Copy link

@christoph-heinrich, thank you for explanation. It appears to me I've found a minor imperfection with Timeline > Chapters: for some reason some regular chapters' names that appear when hovering Timeline do not have left and right padding inside black background. I fixed it by adding a 1.5 multiplier to this line width_overwrite = chapter.title_wrapped_width * self.font_size * 1.5, in -- Chapter title in Timeline.lua.

@christoph-heinrich
Copy link
Contributor

It appears to me I've found a minor imperfection with Timeline > Chapters: for some reason some regular chapters' names that appear when hovering Timeline do not have left and right padding inside black background.

That must be caused by incorrect estimation of the text width, you can try text_width_estimation=no to see if it makes a difference.

@christoph-heinrich
Copy link
Contributor

I've tried that idea with drawing each symbol individually, but the problem is that the border then overlaps the previous symbol. This starts becoming a problem with border sizes > 1.5, and we use 2 for those timestamps.

I made it bigger so it's easier to see, but it's already noticeable at normal scale.
image

@bananakid
Copy link

That must be caused by incorrect estimation of the text width, you can try text_width_estimation=no to see if it makes a difference.

Nope, tested to be not related to text_width_estimation.

I've tried that idea with drawing each symbol individually, but the problem is that the border then overlaps the previous symbol. This starts becoming a problem with border sizes > 1.5, and we use 2 for those timestamps.

Perhaps set character tracking to be calculated based on border size value for values greater than 1.5? If Lua features tracking control.

@christoph-heinrich
Copy link
Contributor

christoph-heinrich commented Oct 28, 2023

That must be caused by incorrect estimation of the text width, you can try text_width_estimation=no to see if it makes a difference.

Nope, tested to be not related to text_width_estimation.

Then I have no idea what might be causing that. Can you provide a sample where this happens?

I've tried that idea with drawing each symbol individually, but the problem is that the border then overlaps the previous symbol. This starts becoming a problem with border sizes > 1.5, and we use 2 for those timestamps.

Perhaps set character tracking to be calculated based on border size value for values greater than 1.5? If Lua features tracking control.

I don't know what you mean with tracking. Do you mean increasing the spacing between characters to avoid overlap?

BTW all the UI you see is drawn with libass, the subtitle rendering library used by mpv. Everything is just fancy subtitles. We assemble the subtitle text in Lua and that's then handed to libass. In case you're curious here is a description of the tags available to us. Everything except animations can be used.

@bananakid
Copy link

Then I have no idea what might be causing that. Can you provide a sample where this happens?

I'll try it but basically it happens with any "regular" (with black background) chapters, while it's fine with "special" (with cyan background, like openings) chapters.

I don't know what you mean with tracking. Do you mean increasing the spacing between characters to avoid overlap?

Yes, totally. Thank you for the link to ASS. It appears like ASS letter spacing may be a conditional fix, however I'm not sure how to apply it to see. By the way my OSD font is Segoe UI 5.65.

tomasklaen added a commit that referenced this issue Nov 4, 2023
Changes background opacity of control buttons. Default is `0`.

ref #722
tomasklaen added a commit that referenced this issue Nov 4, 2023
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