From 742961d2c2cd446fcd96033403b35b0ae111401e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 2 Jun 2023 22:21:52 +0200 Subject: Give filler subtitle reels nodes in SMPTE (#2547). --- src/lib/reel_writer.cc | 9 ++++++++- src/wx/verify_dcp_dialog.cc | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index aae2a6273..fc78740bb 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -823,6 +823,7 @@ shared_ptr ReelWriter::empty_text_asset (TextType type, optional track, bool with_dummy) const { shared_ptr asset; + optional font; auto lang = film()->subtitle_languages(); if (film()->interop()) { @@ -857,7 +858,7 @@ ReelWriter::empty_text_asset (TextType type, optional track, bool if (with_dummy) { asset->add( std::make_shared( - optional(), + font, false, false, false, @@ -880,6 +881,12 @@ ReelWriter::empty_text_asset (TextType type, optional track, bool 0 ) ); + + if (!film()->interop()) { + /* We must have a LoadFont since we have a Text */ + font = "font"; + asset->ensure_font(*font, _default_font); + } } return asset; diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc index b3e229087..2f8dabc09 100644 --- a/src/wx/verify_dcp_dialog.cc +++ b/src/wx/verify_dcp_dialog.cc @@ -422,9 +422,12 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr job case dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT: add(i, _("The XML in the subtitle asset %n has more than one namespace declaration.")); break; - case dcp::VerificationNote::Code::MISSING_LOAD_FONT: + case dcp::VerificationNote::Code::MISSING_LOAD_FONT_FOR_FONT: add(i, _("A subtitle or closed caption refers to a font with ID %id that does not have a corresponding node.")); break; + case dcp::VerificationNote::Code::MISSING_LOAD_FONT: + add(i, "The SMPTE subtitle asset %id has nodes but no node"); + break; } } -- cgit v1.2.3