projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1ff553f
)
Don't search for empty font names to avoid random fonts being chosen.
author
Carl Hetherington
<cth@carlh.net>
Tue, 7 Jun 2022 19:03:37 +0000
(21:03 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 7 Jun 2022 19:03:37 +0000
(21:03 +0200)
src/lib/string_text_file_content.cc
patch
|
blob
|
history
diff --git
a/src/lib/string_text_file_content.cc
b/src/lib/string_text_file_content.cc
index eea9362bbc384369b4fc05e0d00f4040724d500b..934144fa411d6d6fdd7ddfe1c4158501b2e5e948 100644
(file)
--- 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 {