diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-20 23:49:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-20 23:49:48 +0100 |
| commit | c6665c157bdb6903661d21c571c7d112b54ad8fd (patch) | |
| tree | 81910900fb9bcee8958674fef3b1fb70f115d14d /src/interop_subtitle_asset.cc | |
| parent | 2b522d0382a6d4534f1504123a9d16700fe50f0a (diff) | |
Accept fonts as data blocks rather than files.
Diffstat (limited to 'src/interop_subtitle_asset.cc')
| -rw-r--r-- | src/interop_subtitle_asset.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index 316fb08a..c6173a26 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -119,10 +119,11 @@ InteropSubtitleAsset::xml_as_string () const } void -InteropSubtitleAsset::add_font (string load_id, boost::filesystem::path file) +InteropSubtitleAsset::add_font (string load_id, dcp::ArrayData data) { - _fonts.push_back (Font (load_id, make_uuid(), file)); - _load_font_nodes.push_back (shared_ptr<InteropLoadFontNode> (new InteropLoadFontNode (load_id, file.leaf().string ()))); + _fonts.push_back (Font(load_id, make_uuid(), data)); + string const uri = String::compose("font_%1.ttf", _load_font_nodes.size()); + _load_font_nodes.push_back (shared_ptr<InteropLoadFontNode>(new InteropLoadFontNode(load_id, uri))); } bool |
