mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 08:56:59 +01:00
fix(core,player,app): styled subtitles keep their size and place unless restyled
mpv's default sub-ass-override, `scale`, hands an ASS track sub-scale, and sub-pos reaches it under every mode but `no`. So with "Restyle styled subtitles" off, the subtitle size and position settings still resized and moved typeset dialogue and signs. The override is now `yes` when restyling is off, which keeps sub-scale off ASS. A styled track also ignores the style's position, and moves only to stay clear of the player's controls. A frame from an ASS track rendered with every other option changed now matches the untouched one pixel for pixel. Plain (SRT) tracks still take the whole style.
This commit is contained in:
1 parent
69d961d7b8
commit
ffd6e959bb
6 files changed
+78
-29
No files matched your search
@@ -70,8 +70,9 @@ pub struct PlaybackPrefs {
|
||||
/// Every default is mpv's own, so a viewer who never opens the section sees
|
||||
/// what any mpv shows. Plain (SRT) tracks take all of it. A styled (ASS) track
|
||||
/// was typeset by somebody, its signs placed and coloured by hand, and painting
|
||||
/// over that undoes the work — so by default it takes only the size and the
|
||||
/// position, and the rest reaches it only with [`Self::restyle_styled`].
|
||||
/// over that undoes the work — so by default it takes none of this, and moves
|
||||
/// only to stay clear of the player's controls. All of it reaches a styled
|
||||
/// track only with [`Self::restyle_styled`].
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct SubtitleStyle {
|
||||
@@ -100,8 +101,9 @@ pub struct SubtitleStyle {
|
||||
/// Where the line sits, as a percentage of the picture's height from the
|
||||
/// top: 100 is the bottom edge, mpv's usual place.
|
||||
pub position: f64,
|
||||
/// Whether styled (ASS) tracks are repainted in this style too. Off by
|
||||
/// default: it turns signs and karaoke into dialogue-looking text.
|
||||
/// Whether styled (ASS) tracks are drawn in this style too, size and
|
||||
/// position included. Off by default: it turns signs and karaoke into
|
||||
/// dialogue-looking text.
|
||||
pub restyle_styled: bool,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user