muzuiget / dualsub-support

Dualsub - Dual Subtitles for YouTube
https://www.dualsub.xyz/
281 stars 24 forks source link

Line spacing for subtitles/word wrap #263

Closed jamseong closed 3 years ago

jamseong commented 3 years ago

Is there a way to adjust the spacing between multiple language subs and word wrapping?

image

Below is how the subtitle is usually wrapped in Netflix: image

muzuiget commented 3 years ago

You can use custom style, There is a feature call "Plugin" in Dualsub.

Open Dualsub setting page, switch to the "Plugin" tab, add a “style” type plugin, with the code below:

.dualsub-renderer {
    max-width: 800px;
    letter-spacing: 1px;
}

You can change the 800px to your prefer width value, the default width is the video width.

The check the "Website" you want to enable this plugin, the reload the video page.

Screenshot_20210601_113315

jamseong commented 3 years ago

The max-width works perfectly! For the line spacing I think I worded that incorrectly; I meant the margin in between the two different language subtitles:

image

muzuiget commented 3 years ago

How about:

.dualsub-renderer {
    max-width: 800px;
}

.dualsub-renderer .subtitles {
    gap: 8px;
}

Change the gap: 8px for your requirement, by default is 4px;

jamseong commented 3 years ago

That works wonders! Thanks for your speedy responses 👍