summaryrefslogtreecommitdiff
path: root/src/lib/dcp_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-09 20:22:38 +0200
committerCarl Hetherington <cth@carlh.net>2022-07-11 12:22:11 +0200
commit8b9888ed8247109dc3c09492302e865fa4731460 (patch)
tree1ff1c09074decfc44a1bff77d050f908d6542dda /src/lib/dcp_examiner.cc
parent5a5f6d3ac42668017141469fd0e5cd14e3bebe88 (diff)
Fix font handling for DCP subtitles.
Diffstat (limited to 'src/lib/dcp_examiner.cc')
-rw-r--r--src/lib/dcp_examiner.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc
index f2ec68bdd..8fa41a8a5 100644
--- a/src/lib/dcp_examiner.cc
+++ b/src/lib/dcp_examiner.cc
@@ -54,8 +54,10 @@
using std::cout;
using std::dynamic_pointer_cast;
+using std::make_shared;
using std::shared_ptr;
using std::string;
+using std::vector;
using boost::optional;
@@ -132,6 +134,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
for (auto i: cpl->reels()) {
LOG_GENERAL ("Reel %1", i->id());
+ vector<shared_ptr<dcpomatic::Font>> reel_fonts;
if (i->main_picture ()) {
if (!i->main_picture()->asset_ref().resolved()) {
@@ -203,6 +206,10 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
_text_count[static_cast<int>(TextType::OPEN_SUBTITLE)] = 1;
_open_subtitle_language = try_to_parse_language (i->main_subtitle()->language());
+
+ for (auto const& font: i->main_subtitle()->asset()->font_data()) {
+ reel_fonts.push_back(make_shared<dcpomatic::Font>(font.first, font.second));
+ }
}
for (auto j: i->closed_captions()) {
@@ -244,6 +251,8 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
} else if (!i->atmos()) {
_reel_lengths.push_back (i->atmos()->actual_duration());
}
+
+ _fonts.push_back(reel_fonts);
}
_encrypted = cpl->any_encrypted ();