diff options
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 60073f860..5e3d01847 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -31,6 +31,7 @@ #include "content_factory.h" #include "exceptions.h" #include "film.h" +#include "font.h" #include "job.h" #include "text_content.h" #include "util.h" @@ -570,3 +571,33 @@ Content::has_mapped_audio() const return audio && !audio->mapping().mapped_output_channels().empty(); } + +vector<boost::filesystem::path> +Content::font_paths() const +{ + vector<boost::filesystem::path> paths; + + for (auto i: text) { + for (auto j: i->fonts()) { + if (j->file()) { + paths.push_back(*j->file()); + } + } + } + + return paths; +} + + +void +Content::replace_font_path(boost::filesystem::path old_path, boost::filesystem::path new_path) +{ + for (auto i: text) { + for (auto j: i->fonts()) { + if (j->file() && *j->file() == old_path) { + j->set_file(new_path); + } + } + } +} + |
