Load the default font (Perspective Sans) by default

This commit is contained in:
rdb 2013-10-19 11:13:32 +00:00
parent 0c83cc5530
commit 829e79cf29
3 changed files with 10 additions and 5 deletions

View File

@ -9,7 +9,7 @@
#begin lib_target
#define TARGET p3rocket
#define LOCAL_LIBS \
p3display p3pgraph p3gobj p3linmath p3putil p3dgraph
p3display p3pgraph p3gobj p3linmath p3putil p3dgraph p3text
#define COMBINED_SOURCES p3rocket_composite1.cxx

View File

@ -20,6 +20,7 @@
#include "pandaSystem.h"
#include "dconfig.h"
#include "default_font.h"
// This is defined by both Panda and Rocket.
#define Factory RocketFactory
@ -59,4 +60,8 @@ init_librocket() {
Rocket::Core::SetSystemInterface(si);
Rocket::Core::Initialise();
#ifdef COMPILE_IN_DEFAULT_FONT
Rocket::Core::FontDatabase::LoadFontFace(default_font_data, default_font_size);
#endif
}

View File

@ -41,16 +41,16 @@ LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message) {
case Rocket::Core::Log::LT_ALWAYS:
case Rocket::Core::Log::LT_ERROR:
case Rocket::Core::Log::LT_ASSERT:
rocket_cat.error() << message.CString() << "\n";
rocket_cat->error() << message.CString() << "\n";
return true;
case Rocket::Core::Log::LT_WARNING:
rocket_cat.warning() << message.CString() << "\n";
rocket_cat->warning() << message.CString() << "\n";
return true;
case Rocket::Core::Log::LT_INFO:
rocket_cat.info() << message.CString() << "\n";
rocket_cat->info() << message.CString() << "\n";
return true;
case Rocket::Core::Log::LT_DEBUG:
rocket_cat.debug() << message.CString() << "\n";
rocket_cat->debug() << message.CString() << "\n";
}
return true;
}