1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make freetype usage configureable by a setting

This commit is contained in:
PilzAdam 2013-08-04 20:18:56 +02:00
parent 3fd84edb61
commit 2af5864534
8 changed files with 48 additions and 14 deletions

View file

@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "settings.h"
#include "filesys.h"
#include "config.h"
void set_default_settings(Settings *settings)
{
@ -141,10 +142,17 @@ void set_default_settings(Settings *settings)
settings->setDefault("server_name", "");
settings->setDefault("server_description", "");
#if USE_FREETYPE
settings->setDefault("freetype", "true");
settings->setDefault("font_path", porting::getDataPath("fonts" DIR_DELIM "liberationsans.ttf"));
settings->setDefault("font_size", "13");
settings->setDefault("mono_font_path", porting::getDataPath("fonts" DIR_DELIM "liberationmono.ttf"));
settings->setDefault("mono_font_size", "13");
#else
settings->setDefault("freetype", "false");
settings->setDefault("font_path", porting::getDataPath("fonts" DIR_DELIM "fontlucida.png"));
settings->setDefault("mono_font_path", porting::getDataPath("textures" DIR_DELIM "fontdejavusansmono.png"));
#endif
// Server stuff
// "map-dir" doesn't exist by default.