Closed dyphire closed 4 months ago
The effect of correctly scaling the font size using the display-hidpi-scale attribute of mpv windows: Fullscreen:
Should be fixed. Try v1.3.0. The shadow of the danmaku in your screenshot is not set by this plugin. Did you modify the source code? Or maybe your mpv configuration overwrites the default style.
The shadow of the danmaku in your screenshot is not set by this plugin. Did you modify the source code? Or maybe your mpv configuration overwrites the default style.
just osd configuration overwrites the default style.
I realized that in addition to the display-hidpi-scale
property you also need to set the values of res_x
and res_y
correctly for libass to handle ass scaling correctly.
You can refer to the implementation there: https://github.com/itKelis/MPV-Play-BiliBili-Comments/commit/e3e5930
Edit: I read the code again and found that the relevant processing already exists https://github.com/rkscv/danmaku/blob/1b6eb5e4fe27076391630a0cfc6a0f0898f16bfe/src/lib.rs#L149-L150
But it seems that applying new osd-width and osd-height values for zooming is not re-read when the mpv window is switched to full screen, The danmaku become small when displayed fullscreen on a 4K screen.
Currently, the font of the danmu is too small in fullscreen due to not using the display-hidpi-scale property of mpv to scale. windows: Fullscreen: