diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-04-08 01:04:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-04-09 17:23:20 +0200 |
| commit | 1c73379ed8483dcf71c5ccfc459c2c22516a9aef (patch) | |
| tree | 2da4861633a408e4a1fef78cc5cb9f608794bd1d /src/tools/dcpomatic_player.cc | |
| parent | 46193d2898321c70626a80785055884396f3e09d (diff) | |
Fix subtitle font handling with in-memory fonts from SMPTE (#2509).v2.16.52
Previously we would fail to make a font available if it came from
a SMPTE MXF. In that case we have a memory buffer containing the
TTF/OTF file but no file; here we add a hack/workaround so that
in-memory font files can be used by FontConfig.
Diffstat (limited to 'src/tools/dcpomatic_player.cc')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 68460fe68..5ce02b1ea 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -47,6 +47,7 @@ #include "lib/ffmpeg_content.h" #include "lib/file_log.h" #include "lib/film.h" +#include "lib/font_config.h" #include "lib/image.h" #include "lib/image_jpeg.h" #include "lib/image_png.h" @@ -244,6 +245,8 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_timing, this), ID_tools_timing); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_system_information, this), ID_tools_system_information); + Bind(wxEVT_CLOSE_WINDOW, boost::bind(&DOMFrame::close, this, _1)); + if (Config::instance()->player_mode() == Config::PLAYER_MODE_DUAL) { auto pc = new PlaylistControls (_overall_panel, _viewer); _controls = pc; @@ -313,6 +316,12 @@ public: _viewer.stop(); } + void close(wxCloseEvent& ev) + { + FontConfig::drop(); + ev.Skip(); + } + void setup_main_sizer (Config::PlayerMode mode) { _main_sizer->Detach(_viewer.panel()); |
