summaryrefslogtreecommitdiff
path: root/src/gui/sdlfont.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-20 13:32:07 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-20 13:32:07 +0300
commit480d6cf60dcd623905273bf05321d2c5ea8e3ceb (patch)
treef2bd7ec13c181177b34fca520b106b3798fe5825 /src/gui/sdlfont.cpp
parente896b54f054c70bd7214b60cc38159c196c8d5a9 (diff)
downloadplus-480d6cf60dcd623905273bf05321d2c5ea8e3ceb.tar.gz
plus-480d6cf60dcd623905273bf05321d2c5ea8e3ceb.tar.bz2
plus-480d6cf60dcd623905273bf05321d2c5ea8e3ceb.tar.xz
plus-480d6cf60dcd623905273bf05321d2c5ea8e3ceb.zip
Remove advanced fonts loading. Because it may not work in some OS.
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r--src/gui/sdlfont.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 74ae3ef88..3998ffcd2 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -30,9 +30,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
-#ifndef USE_SDL2
#include "resources/resourcemanager.h"
-#endif
#include "resources/surfaceimagehelper.h"
#include "utils/paths.h"
@@ -399,15 +397,16 @@ SDLFont::~SDLFont()
TTF_Font *SDLFont::openFont(const char *const name, const int size)
{
-#ifdef USE_SDL2
- SDL_RWops *const rw = MPHYSFSRWOPS_openRead(name);
- if (!rw)
- return nullptr;
- return TTF_OpenFontIndexRW(rw, 1, size, 0);
-#else
+// disabled for now because some systems like gentoo cant use it
+//#ifdef USE_SDL2
+// SDL_RWops *const rw = MPHYSFSRWOPS_openRead(name);
+// if (!rw)
+// return nullptr;
+// return TTF_OpenFontIndexRW(rw, 1, size, 0);
+//#else
return TTF_OpenFontIndex(ResourceManager::getInstance()->getPath(
name).c_str(), size, 0);
-#endif
+//#endif
}
void SDLFont::loadFont(std::string filename,