mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- removed unused includes of fontconfig to cleanup some code
- added a warning for developers with older versions of fontconfig, to disable using it
This commit is contained in:
@@ -24,6 +24,9 @@ using namespace Shared::Graphics::Gl;
|
|||||||
#include "font_text_freetypegl.h"
|
#include "font_text_freetypegl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If your compiler has a version older than 2.4.1 of fontconfig, you can tell cmake to
|
||||||
|
// disable trying to use fontconfig via passing this to cmake:
|
||||||
|
// -DWANT_FONTCONFIG=Off
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -292,6 +295,11 @@ Font3D::Font3D(FontTextHandlerType type) : Font(type) {
|
|||||||
|
|
||||||
string findFontFamily(const char* font, const char *fontFamily) {
|
string findFontFamily(const char* font, const char *fontFamily) {
|
||||||
string resultFile = "";
|
string resultFile = "";
|
||||||
|
|
||||||
|
// If your compiler has a version older than 2.4.1 of fontconfig, you can tell cmake to
|
||||||
|
// disable trying to use fontconfig via passing this to cmake:
|
||||||
|
// -DWANT_FONTCONFIG=Off
|
||||||
|
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
// Get default font via fontconfig
|
// Get default font via fontconfig
|
||||||
if( !font && FcInit() && fontFamily) {
|
if( !font && FcInit() && fontFamily) {
|
||||||
@@ -328,6 +336,9 @@ string findFontFamily(const char* font, const char *fontFamily) {
|
|||||||
}
|
}
|
||||||
FcFontSetDestroy(fs);
|
FcFontSetDestroy(fs);
|
||||||
}
|
}
|
||||||
|
// If your compiler has a version older than 2.4.1 of fontconfig, you can tell cmake to
|
||||||
|
// disable trying to use fontconfig via passing this to cmake:
|
||||||
|
// -DWANT_FONTCONFIG=Off
|
||||||
FcFini();
|
FcFini();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -20,10 +20,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <FTGL/ftgl.h>
|
#include <FTGL/ftgl.h>
|
||||||
|
|
||||||
#ifdef HAVE_FONTCONFIG
|
|
||||||
#include <fontconfig/fontconfig.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "platform_common.h"
|
#include "platform_common.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
@@ -17,10 +17,6 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#ifdef HAVE_FONTCONFIG
|
|
||||||
#include <fontconfig/fontconfig.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "platform_common.h"
|
#include "platform_common.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
|
Reference in New Issue
Block a user