summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-10-08 23:31:24 +0200
committerCarl Hetherington <cth@carlh.net>2021-10-09 20:04:33 +0200
commit7647290fbaa81e25875758597f7cbbeca19f80bc (patch)
tree5844b8253b4aa6454b95f6cb55f5122ffd12dc76 /test
parentec761b781da73360eb2ba9575935525127a03440 (diff)
Don't ignore font settings for DCP subtitles (#2074).v2.15.167
Diffstat (limited to 'test')
m---------test/data0
-rw-r--r--test/dcp_subtitle_test.cc16
2 files changed, 16 insertions, 0 deletions
diff --git a/test/data b/test/data
-Subproject 246bb9adf94bc72bfe52394eacc88d6419605ac
+Subproject 20f8eb1486ab297eec9f3a7312833354f5b506e
diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc
index d923448d3..fb8888d0c 100644
--- a/test/dcp_subtitle_test.cc
+++ b/test/dcp_subtitle_test.cc
@@ -228,3 +228,19 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test5)
check_font_tags (doc.node_children());
}
+
+
+/** Check that fonts specified in the DoM content are used in the output and not ignored (#2074) */
+BOOST_AUTO_TEST_CASE (test_font_override)
+{
+ auto content = make_shared<DCPSubtitleContent>("test/data/dcp_sub4.xml");
+ auto film = new_test_film2("test_font_override", {content});
+ film->set_interop(true);
+
+ BOOST_REQUIRE_EQUAL(content->text.size(), 1U);
+ content->text.front()->add_font(make_shared<dcpomatic::Font>("theFontId", "test/data/Inconsolata-VF.ttf"));
+
+ make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD });
+ check_file (subtitle_file(film).parent_path() / "font_0.ttf", "test/data/Inconsolata-VF.ttf");
+}
+