diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-10 10:55:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-10 10:55:22 +0100 |
| commit | 8771c1f7b00ab0fb5c252adaa437d753155b7c18 (patch) | |
| tree | f1f4c6109c1b64c795a05ff2a6188f246028e767 /src/subtitle_asset.cc | |
| parent | 91e1e17b4c9771e00b48d9fcc0dcbe2bdfa94c17 (diff) | |
Rename Font -> FontAsset; add dcpdumpsub tool.
Diffstat (limited to 'src/subtitle_asset.cc')
| -rw-r--r-- | src/subtitle_asset.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index 085e5959..d9a87263 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -39,6 +39,7 @@ using std::ofstream; using std::stringstream; using std::cout; using std::cerr; +using std::map; using boost::shared_ptr; using boost::shared_array; using boost::optional; @@ -324,5 +325,15 @@ SubtitleAsset::add_font_data (string id, boost::filesystem::path file) throw FileError ("could not read font file", file, -1); } - _fonts[id] = FontData (data, size); + _fonts[id] = FileData (data, size); +} + +map<string, Data> +SubtitleAsset::fonts () const +{ + map<string, Data> out; + for (map<string, FileData>::const_iterator i = _fonts.begin(); i != _fonts.end(); ++i) { + out[i->first] = i->second; + } + return out; } |
