+ LOG_GENERAL ("KDM is invalid: %1", e.what());
+ } catch (dcp::MiscError& e) {
+ _kdm_valid = false;
+ LOG_GENERAL ("KDM is invalid: %1", e.what());
+ }
+
+ _standard = selected_cpl->standard();
+ if (!selected_cpl->reels().empty()) {
+ auto first_reel = selected_cpl->reels()[0];
+ _three_d = first_reel->main_picture() && first_reel->main_picture()->asset_ref().resolved() && dynamic_pointer_cast<dcp::StereoPictureAsset>(first_reel->main_picture()->asset());
+ }
+ _ratings = selected_cpl->ratings();
+ for (auto version: selected_cpl->content_versions()) {
+ _content_versions.push_back(version.label_text);
+ }
+
+ _cpl = selected_cpl->id();
+}
+
+
+void
+DCPExaminer::add_fonts(shared_ptr<TextContent> content)
+{
+ FontIDAllocator font_id_allocator;
+
+ for (auto const& font: _fonts) {
+ font_id_allocator.add_font(font.reel_index, font.asset_id, font.font->id());
+ }
+
+ font_id_allocator.allocate();
+
+ for (auto const& font: _fonts) {
+ auto font_copy = make_shared<dcpomatic::Font>(*font.font);
+ font_copy->set_id(font_id_allocator.font_id(font.reel_index, font.asset_id, font.font->id()));
+ content->add_font(font_copy);
+ }
+
+ if (!font_id_allocator.has_default_font()) {
+ content->add_font(make_shared<dcpomatic::Font>(font_id_allocator.default_font_id(), default_font_file()));