diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-02-01 21:42:28 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-02-01 21:42:28 +0000 |
| commit | 0789d5215c0398fdc8d94ce6724fab88a3c9c137 (patch) | |
| tree | 1428c18b80672d1ee3f5bda87b3cb95097d5f0af /src | |
| parent | a4e1fc344ddce92f89fd6168da562d9bb88d6a57 (diff) | |
Try to move fontconfig cache delay to program startup on Windows.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/util.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 0ad575b55..4574757e0 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -38,6 +38,9 @@ #include "crypto.h" #include "compose.hpp" #include "audio_buffers.h" +#include "string_text.h" +#include "font.h" +#include "render_text.h" #include <dcp/locale_convert.h> #include <dcp/util.h> #include <dcp/raw_convert.h> @@ -361,6 +364,15 @@ dcpomatic_setup () #ifdef DCPOMATIC_WINDOWS putenv ("PANGOCAIRO_BACKEND=fontconfig"); putenv (String::compose("FONTCONFIG_PATH=%1", shared_path().string()).c_str()); + + /* Render something to fontconfig to create its cache */ + list<StringText> subs; + dcp::SubtitleString ss( + optional<string>(), false, false, false, dcp::Colour(), 42, 1, dcp::Time(), dcp::Time(), 0, dcp::HALIGN_CENTER, 0, dcp::VALIGN_CENTER, dcp::DIRECTION_LTR, + "Hello dolly", dcp::NONE, dcp::Colour(), dcp::Time(), dcp::Time() + ); + subs.push_back (StringText(ss, 0)); + render_text (subs, list<shared_ptr<Font> >(), dcp::Size(640, 480), DCPTime(), 24); #endif Pango::init (); |
