File mupen64plus-use-system-font.patch of Package mupen64plus
Index: mupen64plus-bundle-src-2.0rc2/source/mupen64plus-core/src/osd/osd.cpp
===================================================================
--- mupen64plus-bundle-src-2.0rc2.orig/source/mupen64plus-core/src/osd/osd.cpp
+++ mupen64plus-bundle-src-2.0rc2/source/mupen64plus-core/src/osd/osd.cpp
@@ -40,7 +40,7 @@ extern "C" {
#include "plugin/plugin.h"
}
-#define FONT_FILENAME "font.ttf"
+#define FONT_FILENAME "/usr/share/fonts/truetype/DejaVuSans.ttf"
typedef void (APIENTRYP PTRGLACTIVETEXTURE)(GLenum texture);
static PTRGLACTIVETEXTURE pglActiveTexture = NULL;
@@ -217,8 +217,6 @@ static float get_message_offset(osd_mess
extern "C"
void osd_init(int width, int height)
{
- const char *fontpath;
-
osd_list_lock = SDL_CreateMutex();
if (!osd_list_lock) {
DebugMessage(M64MSG_ERROR, "Could not create osd list lock");
@@ -231,13 +229,11 @@ void osd_init(int width, int height)
return;
}
- fontpath = ConfigGetSharedDataFilepath(FONT_FILENAME);
-
- l_font = new OGLFT::Monochrome(fontpath, (float) height / 35.0f); // make font size proportional to screen height
+ l_font = new OGLFT::Monochrome(FONT_FILENAME, (float) height / 35.0f); // make font size proportional to screen height
if(!l_font || !l_font->isValid())
{
- DebugMessage(M64MSG_ERROR, "Could not construct face from %s", fontpath);
+ DebugMessage(M64MSG_ERROR, "Could not construct face from %s", FONT_FILENAME);
return;
}