mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 07:52:51 +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"
|
||||
#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
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
@@ -292,6 +295,11 @@ Font3D::Font3D(FontTextHandlerType type) : Font(type) {
|
||||
|
||||
string findFontFamily(const char* font, const char *fontFamily) {
|
||||
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
|
||||
// Get default font via fontconfig
|
||||
if( !font && FcInit() && fontFamily) {
|
||||
@@ -328,6 +336,9 @@ string findFontFamily(const char* font, const char *fontFamily) {
|
||||
}
|
||||
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();
|
||||
}
|
||||
#else
|
||||
|
@@ -20,10 +20,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <FTGL/ftgl.h>
|
||||
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
|
||||
#include "platform_common.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@@ -17,10 +17,6 @@
|
||||
#include <stdexcept>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
|
||||
#include "platform_common.h"
|
||||
#include "util.h"
|
||||
#include "font.h"
|
||||
|
Reference in New Issue
Block a user