diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-02 23:52:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-07-02 23:52:54 +0100 |
| commit | 3dd6717ebb8766fd9ca2a9983e9d0bed69312d1e (patch) | |
| tree | 6fdf17eee89009c3c221398b6179ddee98befbee | |
| parent | 59f07d959514b80fcce5aa99f575ef8e6fceba8b (diff) | |
Take y scale into account when deciding subtitle line spacing.
| -rw-r--r-- | src/lib/player.cc | 4 | ||||
| -rw-r--r-- | src/lib/subtitle_decoder.cc | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index e24baf3fa..f8bfb527b 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -181,7 +181,8 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque Changed (frequent); } else if ( - property == SubtitleContentProperty::LINE_SPACING + property == SubtitleContentProperty::LINE_SPACING || + property == SubtitleContentProperty::Y_SCALE ) { /* These changes just need the pieces' decoders to be reset. @@ -199,7 +200,6 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque property == SubtitleContentProperty::X_OFFSET || property == SubtitleContentProperty::Y_OFFSET || property == SubtitleContentProperty::X_SCALE || - property == SubtitleContentProperty::Y_SCALE || property == SubtitleContentProperty::FONTS || property == VideoContentProperty::CROP || property == VideoContentProperty::SCALE || diff --git a/src/lib/subtitle_decoder.cc b/src/lib/subtitle_decoder.cc index 63ab7c471..72c6883fb 100644 --- a/src/lib/subtitle_decoder.cc +++ b/src/lib/subtitle_decoder.cc @@ -174,8 +174,9 @@ SubtitleDecoder::give_text (ContentTimePeriod period, sub::Subtitle const & subt /* This 1.015 is an arbitrary value to lift the bottom sub off the bottom of the screen a bit to a pleasing degree. */ - v_position = 1.015 - (1 + bottom_line.get() - i.vertical_position.line.get()) - * 1.2 * content()->line_spacing() * j.font_size.proportional (72 * 11); + v_position = 1.015 - + (1 + bottom_line.get() - i.vertical_position.line.get()) + * 1.2 * content()->line_spacing() * content()->y_scale() * j.font_size.proportional (72 * 11); v_align = dcp::VALIGN_TOP; } else { |
