summaryrefslogtreecommitdiff
path: root/test/render_subtitles_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-06-01 13:03:38 +0200
committerCarl Hetherington <cth@carlh.net>2022-06-07 17:01:06 +0200
commit5a820bb8fae34591be5ac6d19a73461b9dab532a (patch)
tree098e2dc959b6df0fefa62b2976976afc9f81b96b /test/render_subtitles_test.cc
parent9a7b67aee32a40539f29bc2d7017edd4a4f65f11 (diff)
Rearrange subtitle font management.
With this change each subtitle coming out of the player has a reference to a dcpomatic::Font that belongs to the TextContent. This hopefully solves a few problems which all basically stemmed from the fact that previously the decoders/player were deciding what the font ID in the output DCP would be - they can't do that properly.
Diffstat (limited to 'test/render_subtitles_test.cc')
-rw-r--r--test/render_subtitles_test.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/render_subtitles_test.cc b/test/render_subtitles_test.cc
index 5774c8e9a..d850062c2 100644
--- a/test/render_subtitles_test.cc
+++ b/test/render_subtitles_test.cc
@@ -18,15 +18,19 @@
*/
+
/** @file test/render_text_test.cc
* @brief Check markup of subtitles for rendering.
* @ingroup feature
*/
+
#include "lib/render_text.h"
+#include "lib/string_text.h"
#include <dcp/subtitle_string.h>
#include <boost/test/unit_test.hpp>
+
static void
add (std::list<StringText>& s, std::string text, bool italic, bool bold, bool underline)
{
@@ -54,7 +58,8 @@ add (std::list<StringText>& s, std::string text, bool italic, bool bold, bool un
dcp::Time (),
0
),
- 2
+ 2,
+ std::shared_ptr<dcpomatic::Font>()
)
);
}