summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/subtitle_asset.h')
-rw-r--r--src/subtitle_asset.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index bc5fa882..88f05659 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -115,8 +115,13 @@ public:
std::map<std::string, ArrayData> font_data () const;
std::map<std::string, boost::filesystem::path> font_filenames () const;
- virtual void write (boost::filesystem::path) const = 0;
- virtual std::string xml_as_string () const = 0;
+ enum class FontTags {
+ OMIT,
+ INCLUDE
+ };
+
+ virtual void write(boost::filesystem::path, FontTags font_tags = FontTags::INCLUDE) const = 0;
+ virtual std::string xml_as_string(FontTags font_tags = FontTags::INCLUDE) const = 0;
Time latest_subtitle_out () const;
@@ -178,7 +183,7 @@ protected:
Time fade_time (xmlpp::Element const * node, std::string name, boost::optional<int> tcr) const;
void position_align (ParseState& ps, xmlpp::Element const * node) const;
- void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Standard standard) const;
+ void subtitles_as_xml(xmlpp::Element* root, int time_code_rate, Standard standard, FontTags fonts) const;
/** All our subtitles, in no particular order */
std::vector<std::shared_ptr<Subtitle>> _subtitles;
@@ -220,6 +225,7 @@ private:
void maybe_add_subtitle (std::string text, std::vector<ParseState> const & parse_state, float space_before, Standard standard);
static void pull_fonts (std::shared_ptr<order::Part> part);
+ static void clear_fonts(std::shared_ptr<order::Part> part);
};