From de004ef24e078906f656cbf4cc790bbfe11ea69c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 8 Nov 2016 10:59:22 +0000 Subject: Various fixes to subtitle rendering. Use to mark text up for Pango as this can set up everything, and is easier than using .. etc. Fix the estimation of subtitle area size to cope with different subtitle sizes. Use show_in_cairo_context rather than add_to_cairo_context so that colours in the markup are respected. --- test/render_subtitles_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/render_subtitles_test.cc b/test/render_subtitles_test.cc index 91aafb072..68b819689 100644 --- a/test/render_subtitles_test.cc +++ b/test/render_subtitles_test.cc @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test1) { std::list s; add (s, "Hello", false, false, false); - BOOST_CHECK_EQUAL (marked_up (s), "Hello"); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello"); } /** Test marked_up() in render_subtitles.cc */ @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test2) { std::list s; add (s, "Hello", false, true, false); - BOOST_CHECK_EQUAL (marked_up (s), "Hello"); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello"); } @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test3) { std::list s; add (s, "Hello", true, true, false); - BOOST_CHECK_EQUAL (marked_up (s), "Hello"); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello"); } /** Test marked_up() in render_subtitles.cc */ @@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test4) { std::list s; add (s, "Hello", true, true, true); - BOOST_CHECK_EQUAL (marked_up (s), "Hello"); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello"); } /** Test marked_up() in render_subtitles.cc */ @@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test5) std::list s; add (s, "Hello", false, true, false); add (s, " world.", false, false, false); - BOOST_CHECK_EQUAL (marked_up (s), "Hello world."); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello world."); } /** Test marked_up() in render_subtitles.cc */ @@ -101,5 +101,5 @@ BOOST_AUTO_TEST_CASE (render_markup_test6) add (s, "Hello", true, false, false); add (s, " world ", false, false, false); add (s, "we are bold.", false, true, false); - BOOST_CHECK_EQUAL (marked_up (s), "Hello world we are bold."); + BOOST_CHECK_EQUAL (marked_up (s, 1024), "Hello world we are bold."); } -- cgit v1.2.3