+ assets.push_back (make_shared<FontAsset>(i.uuid, i.file.get()));
+ }
+}
+
+
+void
+InteropSubtitleAsset::write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const
+{
+ Asset::write_to_assetmap (node, root);
+
+ for (auto i: _subtitles) {
+ auto im = dynamic_pointer_cast<dcp::SubtitleImage> (i);
+ if (im) {
+ DCP_ASSERT (im->file());
+ write_file_to_assetmap (node, root, im->file().get(), im->id());
+ }
+ }
+}
+
+
+void
+InteropSubtitleAsset::add_to_pkl (shared_ptr<PKL> pkl, boost::filesystem::path root) const
+{
+ Asset::add_to_pkl (pkl, root);
+
+ for (auto i: _subtitles) {
+ auto im = dynamic_pointer_cast<dcp::SubtitleImage> (i);
+ if (im) {
+ auto png_image = im->png_image ();
+ pkl->add_asset (im->id(), optional<string>(), make_digest(png_image), png_image.size(), "image/png");
+ }
+ }
+}
+
+
+void
+InteropSubtitleAsset::set_font_file (string load_id, boost::filesystem::path file)
+{
+ for (auto& i: _fonts) {
+ if (i.load_id == load_id) {
+ i.file = file;
+ }
+ }
+
+ for (auto i: _load_font_nodes) {
+ if (i->id == load_id) {
+ i->uri = file.filename().string();
+ }