Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > tainted-release-src > by-pkgid > 9fd8b2aa635f158ced4c4521289d3c59 > files > 1

mupen64plus-2.5-3.mga6.tainted.src.rpm

PATCH-FIX-OPENSUSE mupen64plus-use-system-font.patch gber@opensuse.org
Use system DejaVu font rather than an inlined copy of it
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/TTF/dejavu/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;
     }