X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Ftext_decoder.cc;h=fa5ed6c7a1025b441010e625bbdffa83e60f2ac8;hp=930262a74da321fa22ac2df75bd2127c46592608;hb=ff639b3cf30afcc097bfd21d39c8d15f466cadd6;hpb=9726a58f44d52d235b027225ddd68c6acf83c733 diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index 930262a74..fa5ed6c7a 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -110,7 +110,7 @@ TextDecoder::emit_plain_start (ContentTime from, vector sub auto string_text = StringText( subtitle, content()->outline_width(), - subtitle.font() ? content()->get_font(*subtitle.font()) : shared_ptr(), + content()->get_font(subtitle.font().get_value_or("")), valign_standard ); string_text.set_text(escape_text(string_text.text())); @@ -167,10 +167,10 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & sub_subti switch (line.vertical_position.reference.get_value_or(sub::BOTTOM_OF_SCREEN)) { case sub::BOTTOM_OF_SCREEN: case sub::TOP_OF_SUBTITLE: - /* This 1.015 is an arbitrary value to lift the bottom sub off the bottom + /* This 0.9 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 - + v_position = 0.9 - (1 + bottom_line.get() - line.vertical_position.line.get()) * multiplier; v_align = dcp::VAlign::TOP;