- auto content = content_factory("test/data/" + name + ".srt").front();
- content->text.front()->set_type (TextType::OPEN_SUBTITLE);
- content->text.front()->set_language (dcp::LanguageTag("en-US"));
- for (int i = 1; i < 512; ++i) {
- auto font = make_shared<dcpomatic::Font>(String::compose("font_%1", i));
- font->set_file ("test/data/LiberationSans-Regular.ttf");
- content->text.front()->add_font(font);
+
+ for (int i = 0; i < 4; ++i) {
+ dcp::File fake_font("build/test/hint_subtitle_mxf_too_big.ttf", "w");
+ for (int i = 0; i < 512; ++i) {
+ std::vector<uint8_t> rubbish(65536);
+ fake_font.write(rubbish.data(), 1, rubbish.size());
+ }
+ fake_font.close();
+
+ 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());
+ auto const font = content->text[0]->get_font(String::compose("0_font_%1", i));
+ BOOST_REQUIRE(font);
+ font->set_file("build/test/hint_subtitle_mxf_too_big.ttf");