summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-19 22:33:44 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-30 19:59:06 +0200
commit09f35415304afc127f50edfe4357a28c5a0e2ff9 (patch)
tree7f55e8e3a0eaac33e3378ec730b2fe015f19c962 /test
parent5708ccdd531c72ff9e43106d354464adf6afa699 (diff)
Render subtitles using show_in_cairo_context() instead of add_to_cairo_context().
This helps with #2813 and should fix #2474. We started using add_to_cairo_context() again in 72c3a5f0f32f553a1f8abee2494f31d29b976383 because the rendering looked better. However colour changes within lines cannot easily be rendered using add_to_cairo_context() it seems, as the text is just added as a path and then you can stroke/fill it with a single colour. I hope that this change, which reverts 72c3a5 but also adds some calls to enable hinting and use better anti-aliasing, looks OK. I looked at some white-on-black subs close-up and the hinting seems to help.
Diffstat (limited to 'test')
-rw-r--r--test/burnt_subtitle_test.cc12
m---------test/data0
2 files changed, 9 insertions, 3 deletions
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc
index c3c253d51..2be712262 100644
--- a/test/burnt_subtitle_test.cc
+++ b/test/burnt_subtitle_test.cc
@@ -68,8 +68,10 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
{ dcp::VerificationNote::Code::MISSING_CPL_METADATA }
);
-#ifdef DCPOMATIC_WINDOWS
+#if defined(DCPOMATIC_WINDOWS)
check_dcp("test/data/windows/burnt_subtitle_test_subrip", film);
+#elif defined(DCPOMATIC_OSX)
+ check_dcp("test/data/mac/burnt_subtitle_test_subrip", film);
#else
check_dcp("test/data/burnt_subtitle_test_subrip", film);
#endif
@@ -129,8 +131,10 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_onto_dcp)
BOOST_CHECK_EQUAL (xyz->size().width, 1998);
BOOST_CHECK_EQUAL (xyz->size().height, 1080);
-#ifdef DCPOMATIC_WINDOWS
+#if defined(DCPOMATIC_WINDOWS)
check_dcp("test/data/windows/burnt_subtitle_test_onto_dcp2", film2);
+#elif defined(DCPOMATIC_OSX)
+ check_dcp("test/data/mac/burnt_subtitle_test_onto_dcp2", film2);
#else
check_dcp("test/data/burnt_subtitle_test_onto_dcp2", film2);
#endif
@@ -156,8 +160,10 @@ BOOST_AUTO_TEST_CASE(burnt_subtitle_test_position)
dcp::VerificationNote::Code::MISSING_CPL_METADATA
});
-#ifdef DCPOMATIC_WINDOWS
+#if defined(DCPOMATIC_WINDOWS)
check_dcp(String::compose("test/data/windows/%1", name), film);
+#elif defined(DCPOMATIC_OSX)
+ check_dcp(String::compose("test/data/mac/%1", name), film);
#else
check_dcp(String::compose("test/data/%1", name), film);
#endif
diff --git a/test/data b/test/data
-Subproject f647e9364406f7934acd4c248c77287a810f59c
+Subproject 27a4c1a8fbb90dca275ca94cdd86f9f14536e41