File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828#include " flamegpu/visualiser/multipass/FrameBufferAttachment.h"
2929#include " util/Resources.h"
3030
31+ #if defined(__GNUC__) || defined(__clang__)
32+ #include < fontconfig/fontconfig.h>
33+ #endif
34+
3135namespace flamegpu {
3236namespace visualiser {
3337
@@ -226,6 +230,10 @@ Visualiser::Visualiser(const ModelConfig& modelcfg)
226230}
227231Visualiser::~Visualiser () {
228232 this ->close ();
233+ #if defined(__GNUC__) || defined(__clang__)
234+ // Fully clean up font config
235+ FcFini ();
236+ #endif
229237}
230238void Visualiser::start () {
231239 // Only execute if background thread is not active
Original file line number Diff line number Diff line change @@ -94,9 +94,6 @@ std::string fontSearch(const std::string commaSeparatedfonts) {
9494 FcConfigDestroy (config);
9595 config = nullptr ;
9696
97- // Fully clean up font config - this should probably be in a called-once function rather than on each invocation
98- FcFini ();
99-
10097 // Return the path to the desired font.
10198 return fontpath;
10299}
You can’t perform that action at this time.
0 commit comments