- 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:
Mark Vejvoda 2012-10-30 20:03:23 +00:00
parent b5966c3049
commit 6a734a0336
3 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"