+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub3.xml"));
+ film->examine_and_add_content (content);
+ BOOST_REQUIRE (!wait_for_jobs ());
+
+ film->make_dcp ();
+ BOOST_REQUIRE (!wait_for_jobs ());
+
+ shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (film, content));
+ stored = optional<ContentStringText> ();
+ while (!decoder->pass ()) {
+ decoder->only_text()->PlainStart.connect (bind (store, _1));
+ if (stored && stored->from() == ContentTime::from_seconds(0.08)) {
+ list<dcp::SubtitleString> s = stored->subs;
+ list<dcp::SubtitleString>::const_iterator i = s.begin ();
+ BOOST_CHECK_EQUAL (i->text(), "This");
+ ++i;
+ BOOST_REQUIRE (i != s.end ());
+ BOOST_CHECK_EQUAL (i->text(), " is ");
+ ++i;
+ BOOST_REQUIRE (i != s.end ());
+ BOOST_CHECK_EQUAL (i->text(), "wrong.");
+ ++i;
+ BOOST_REQUIRE (i == s.end ());
+ }
+ }
+}
+
+/** Check that Interop DCPs aren't made with more than one <LoadFont> (#1273) */
+BOOST_AUTO_TEST_CASE (dcp_subtitle_test4)
+{
+ shared_ptr<Film> film = new_test_film2 ("dcp_subtitle_test4");
+ film->set_interop (true);
+
+ shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub3.xml"));