X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fstring_text_file_content.cc;h=eea9362bbc384369b4fc05e0d00f4040724d500b;hp=3750b0a5026a70db90b54dfdfe67ea2465fe6a62;hb=280a456ae1da8fa648be1e9f68140f045b306e32;hpb=5a820bb8fae34591be5ac6d19a73461b9dab532a diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc index 3750b0a50..eea9362bb 100644 --- a/src/lib/string_text_file_content.cc +++ b/src/lib/string_text_file_content.cc @@ -19,13 +19,15 @@ */ -#include "string_text_file_content.h" -#include "util.h" -#include "string_text_file.h" #include "film.h" #include "font.h" +#include "font_config.h" +#include "string_text_file.h" +#include "string_text_file_content.h" #include "text_content.h" +#include "util.h" #include +#include #include #include @@ -76,10 +78,12 @@ StringTextFileContent::examine (shared_ptr film, shared_ptr job } for (auto name: names) { - /* Make a font for each family name that somebody might later - * ask about. - */ - only_text()->add_font(make_shared(name)); + auto path = FontConfig::instance()->system_font_with_name(name); + if (path) { + only_text()->add_font(make_shared(name, *path)); + } else { + only_text()->add_font(make_shared(name)); + } } boost::mutex::scoped_lock lm (_mutex);