Make it OK to re-examine content with subtitles.
authorCarl Hetherington <cth@carlh.net>
Thu, 9 Jun 2022 19:16:31 +0000 (21:16 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 10 Jun 2022 21:12:13 +0000 (23:12 +0200)
src/lib/string_text_file_content.cc
src/lib/text_content.cc
src/lib/text_content.h

index 934144fa411d6d6fdd7ddfe1c4158501b2e5e948..95a2821748a344e1a6ea986658f1d409df3f1446 100644 (file)
@@ -66,6 +66,8 @@ StringTextFileContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job
        Content::examine (film, job);
        StringTextFile file (shared_from_this());
 
+       only_text()->clear_fonts();
+
        /* Default to turning these subtitles on */
        only_text()->set_use (true);
 
index 9c925cbcfb6bb0c6849fba9a947c66c70e7fa36b..e91b7bcc039c7e8344414455a14883dd0a55301c 100644 (file)
@@ -664,3 +664,10 @@ TextContent::get_font(string id) const
        return *iter;
 }
 
+
+void
+TextContent::clear_fonts()
+{
+       _fonts.clear();
+}
+
index f46b6c6d0068733a1a17973fd6def36d5deab53f..7ddb20b080dabc63e503393c195c247cf9396830 100644 (file)
@@ -76,6 +76,7 @@ public:
        std::string identifier () const;
        void take_settings_from (std::shared_ptr<const TextContent> c);
 
+       void clear_fonts ();
        void add_font (std::shared_ptr<dcpomatic::Font> font);
        std::shared_ptr<dcpomatic::Font> get_font(std::string id) const;