diff --git a/panda/src/rocket/Sources.pp b/panda/src/rocket/Sources.pp index f982f8a37c..ce23403691 100644 --- a/panda/src/rocket/Sources.pp +++ b/panda/src/rocket/Sources.pp @@ -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 diff --git a/panda/src/rocket/config_rocket.cxx b/panda/src/rocket/config_rocket.cxx index 064f354c63..fb9a734000 100644 --- a/panda/src/rocket/config_rocket.cxx +++ b/panda/src/rocket/config_rocket.cxx @@ -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 } diff --git a/panda/src/rocket/rocketSystemInterface.cxx b/panda/src/rocket/rocketSystemInterface.cxx index f587f4b1dd..c417c60339 100644 --- a/panda/src/rocket/rocketSystemInterface.cxx +++ b/panda/src/rocket/rocketSystemInterface.cxx @@ -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; }