From 3dd6717ebb8766fd9ca2a9983e9d0bed69312d1e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 2 Jul 2016 23:52:54 +0100 Subject: Take y scale into account when deciding subtitle line spacing. --- src/lib/player.cc | 4 ++-- src/lib/subtitle_decoder.cc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib') 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 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 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 { -- cgit v1.2.3