The subtitle XML refers to a font with no corresponding <LoadFont>.
FontIDAllocator::font_id(int reel_index, string asset_id, string font_id) const
{
auto iter = _map.find(Font(reel_index, asset_id, font_id));
- DCPOMATIC_ASSERT(iter != _map.end());
+ if (iter == _map.end()) {
+ return default_font_id();
+ }
return String::compose("%1_%2", iter->second, font_id);
}
-Subproject commit 4cb08962ba07e99c442cb12091c0347d84d8fd89
+Subproject commit 6a4fa8b7c13e4f09fcee995191a2c86e1eff9d6d
while (!player.pass()) {}
}
+
+BOOST_AUTO_TEST_CASE(cope_with_unloaded_font_id)
+{
+ /* This file has a <Font> with an ID that corresponds to no <LoadFont> */
+ auto subs = content_factory("test/data/unloaded_font.xml")[0];
+ auto film = new_test_film2("cope_with_unloaded_font_id", { subs });
+ make_and_verify_dcp(
+ film,
+ {
+ dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE,
+ dcp::VerificationNote::Code::MISSING_CPL_METADATA,
+ });
+}
+