diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-06-07 21:03:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-06-07 21:03:37 +0200 |
| commit | e6ebc314597b0e52ebfdbc7190d847adc5c6adcb (patch) | |
| tree | 0a02f9459ad23e1d3ac3c0d6695daecd18dc2f39 | |
| parent | 1ff553f6752469b940b5c59e2a619e71736e7611 (diff) | |
Don't search for empty font names to avoid random fonts being chosen.
| -rw-r--r-- | src/lib/string_text_file_content.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc index eea9362bb..934144fa4 100644 --- a/src/lib/string_text_file_content.cc +++ b/src/lib/string_text_file_content.cc @@ -40,6 +40,7 @@ using std::list; using std::make_shared; using std::shared_ptr; using std::string; +using boost::optional; using dcp::raw_convert; using namespace dcpomatic; @@ -78,7 +79,10 @@ StringTextFileContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job } for (auto name: names) { - auto path = FontConfig::instance()->system_font_with_name(name); + optional<boost::filesystem::path> path; + if (!name.empty()) { + path = FontConfig::instance()->system_font_with_name(name); + } if (path) { only_text()->add_font(make_shared<Font>(name, *path)); } else { |
