}
+void
+SubtitleAsset::clear_fonts(shared_ptr<order::Part> part)
+{
+ part->font.clear();
+ for (auto child: part->children) {
+ clear_fonts(child);
+ }
+}
+
+
/** @param standard Standard (INTEROP or SMPTE); this is used rather than putting things in the child
* class because the differences between the two are fairly subtle.
*/
void
-SubtitleAsset::subtitles_as_xml (xmlpp::Element* xml_root, int time_code_rate, Standard standard) const
+SubtitleAsset::subtitles_as_xml(xmlpp::Element* xml_root, int time_code_rate, Standard standard, FontTags fonts) const
{
auto sorted = _subtitles;
std::stable_sort(sorted.begin(), sorted.end(), SubtitleSorter());
}
}
- /* Pull font changes as high up the hierarchy as we can */
-
- pull_fonts (root);
+ if (fonts == FontTags::INCLUDE) {
+ /* Pull font changes as high up the hierarchy as we can */
+ pull_fonts(root);
+ } else {
+ clear_fonts(root);
+ }
/* Write XML */