Fix subtitle font handling with in-memory fonts from SMPTE (#2509).
[dcpomatic.git] / src / lib / font_config.h
index 6dadbae8ad88ed416e0bc6724aeb6c7a30abe6f4..edcb4be36a8a0d1b89c48ead0960ffa4e3547081 100644 (file)
@@ -31,14 +31,19 @@ class FontConfig
 public:
        static FontConfig* instance();
 
-       std::string make_font_available(boost::filesystem::path font_file);
+       std::string make_font_available(std::shared_ptr<dcpomatic::Font> font);
        boost::optional<boost::filesystem::path> system_font_with_name(std::string name);
 
+       static void drop();
+
 private:
        FontConfig();
+       ~FontConfig();
 
        FcConfig* _config = nullptr;
-       std::map<boost::filesystem::path, std::string> _available_fonts;
+       std::map<std::string, std::string> _available_fonts;
+
+       std::vector<boost::filesystem::path> _temp_files;
 
        static FontConfig* _instance;
 };