diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-20 23:49:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-20 23:49:48 +0100 |
| commit | c6665c157bdb6903661d21c571c7d112b54ad8fd (patch) | |
| tree | 81910900fb9bcee8958674fef3b1fb70f115d14d /test | |
| parent | 2b522d0382a6d4534f1504123a9d16700fe50f0a (diff) | |
Accept fonts as data blocks rather than files.
Diffstat (limited to 'test')
| -rw-r--r-- | test/dcp_font_test.cc | 4 | ||||
| -rw-r--r-- | test/test.cc | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/test/dcp_font_test.cc b/test/dcp_font_test.cc index 6a3941f9..5884cbc0 100644 --- a/test/dcp_font_test.cc +++ b/test/dcp_font_test.cc @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE (interop_dcp_font_test) dcp::DCP dcp (directory); shared_ptr<dcp::InteropSubtitleAsset> subs (new dcp::InteropSubtitleAsset ()); - subs->add_font ("theFontId", "test/data/dummy.ttf"); + subs->add_font ("theFontId", dcp::ArrayData("test/data/dummy.ttf")); subs->write (directory / "frobozz.xml"); check_file ("test/data/dummy.ttf", "build/test/interop_dcp_font_test/dummy.ttf"); @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (smpte_dcp_font_test) dcp::DCP dcp (directory); shared_ptr<dcp::SMPTESubtitleAsset> subs (new dcp::SMPTESubtitleAsset ()); - subs->add_font ("theFontId", "test/data/dummy.ttf"); + subs->add_font ("theFontId", dcp::ArrayData("test/data/dummy.ttf")); subs->write (directory / "frobozz.mxf"); shared_ptr<dcp::Reel> reel (new dcp::Reel ()); diff --git a/test/test.cc b/test/test.cc index bace2326..69772e98 100644 --- a/test/test.cc +++ b/test/test.cc @@ -345,8 +345,7 @@ make_simple_with_interop_subs (boost::filesystem::path path) boost::filesystem::create_directory (path / "subs"); dcp::ArrayData data(4096); - data.write (path / "subs" / "font.ttf"); - subs->add_font ("afont", path / "subs" / "font.ttf"); + subs->add_font ("afont", data); subs->write (path / "subs" / "subs.xml"); shared_ptr<dcp::ReelSubtitleAsset> reel_subs(new dcp::ReelSubtitleAsset(subs, dcp::Fraction(24, 1), 240, 0)); |
