summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-04-08 01:04:37 +0200
committerCarl Hetherington <cth@carlh.net>2023-04-09 17:23:20 +0200
commit1c73379ed8483dcf71c5ccfc459c2c22516a9aef (patch)
tree2da4861633a408e4a1fef78cc5cb9f608794bd1d /src/tools
parent46193d2898321c70626a80785055884396f3e09d (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')
-rw-r--r--src/tools/dcpomatic.cc3
-rw-r--r--src/tools/dcpomatic_player.cc9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index d40976094..5b43e510c 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -74,6 +74,7 @@
#include "lib/exceptions.h"
#include "lib/ffmpeg_encoder.h"
#include "lib/film.h"
+#include "lib/font_config.h"
#include "lib/hints.h"
#include "lib/job_manager.h"
#include "lib/kdm_with_metadata.h"
@@ -1191,6 +1192,8 @@ private:
/* Also stop hearing about analytics-related stuff */
_analytics_message_connection.disconnect ();
+ FontConfig::drop();
+
ev.Skip ();
}
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());