Fix DCP content font ID allocation to cope with DCPs that have multiple fonts
[dcpomatic.git] / test / hints_test.cc
index 0e856c4f95ed9a0cd881a8d0de171f24569b504a..a989d3aeb5b0e6c74c23340f1341af6e5c07c1aa 100644 (file)
@@ -193,12 +193,13 @@ BOOST_AUTO_TEST_CASE (hint_subtitle_mxf_too_big)
                }
                fake_font.close();
 
-               auto content = content_factory("test/data/" + name + ".srt")[0];
+               auto content = content_factory(String::compose("test/data/%1%2.xml", name, i))[0];
                content->text[0]->set_type(TextType::OPEN_SUBTITLE);
                content->text[0]->set_language(dcp::LanguageTag("en-US"));
                film->examine_and_add_content(content);
                BOOST_REQUIRE (!wait_for_jobs());
-               content->text[0]->get_font("")->set_file("build/test/hint_subtitle_mxf_too_big.ttf");
+               auto const font = content->text[0]->get_font(String::compose("font_%1", i));
+               font->set_file("build/test/hint_subtitle_mxf_too_big.ttf");
        }
 
        auto hints = get_hints (film);