summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/subtitle_asset.cc')
-rw-r--r--src/subtitle_asset.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
index d6103a1d..5a448f3f 100644
--- a/src/subtitle_asset.cc
+++ b/src/subtitle_asset.cc
@@ -928,3 +928,12 @@ SubtitleAsset::format_xml(xmlpp::Document const& document, optional<pair<string,
return state.xml;
}
+
+void
+SubtitleAsset::ensure_font(string load_id, dcp::ArrayData data)
+{
+ if (std::find_if(_fonts.begin(), _fonts.end(), [load_id](Font const& font) { return font.load_id == load_id; }) == _fonts.end()) {
+ add_font(load_id, data);
+ }
+}
+