diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-06-02 22:21:52 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-06-05 00:48:55 +0200 |
| commit | 742961d2c2cd446fcd96033403b35b0ae111401e (patch) | |
| tree | bb7ae53ffd16d6df90bc2987189a749c97d92d84 /src | |
| parent | cc39c4f57fc48c581a25dc4c37f26adf95278914 (diff) | |
Give filler subtitle reels <LoadFont> nodes in SMPTE (#2547).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/reel_writer.cc | 9 | ||||
| -rw-r--r-- | src/wx/verify_dcp_dialog.cc | 5 |
2 files changed, 12 insertions, 2 deletions
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<dcp::SubtitleAsset> ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> track, bool with_dummy) const { shared_ptr<dcp::SubtitleAsset> asset; + optional<string> font; auto lang = film()->subtitle_languages(); if (film()->interop()) { @@ -857,7 +858,7 @@ ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> track, bool if (with_dummy) { asset->add( std::make_shared<dcp::SubtitleString>( - optional<std::string>(), + font, false, false, false, @@ -880,6 +881,12 @@ ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> 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<VerifyDCPJob> 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 <LoadFont> node.")); break; + case dcp::VerificationNote::Code::MISSING_LOAD_FONT: + add(i, "The SMPTE subtitle asset %id has <Text> nodes but no <LoadFont> node"); + break; } } |
