try to find arial in /usr/share/fonts/truetype/msttcorefonts/arial.ttf, too
authorhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 9 Dec 2005 08:23:48 +0000 (08:23 +0000)
committerhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 9 Dec 2005 08:23:48 +0000 (08:23 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@18 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c

index a730cee..81e6777 100644 (file)
@@ -46,15 +46,18 @@ struct graphics_image_gra {
 static struct graphics_font *font_new(struct graphics *gr, int size)
 {
        char *filename="/usr/X11R6/lib/X11/fonts/msttcorefonts/arial.ttf";
+       char *filename2="/usr/share/fonts/truetype/msttcorefonts/arial.ttf";
        struct graphics_font *font=g_new(struct graphics_font, 1);
        if (!gr->gra->library_init) {
                FT_Init_FreeType( &gr->gra->library );
                gr->gra->library_init=1;
        }
        if (FT_New_Face( gr->gra->library, filename, 0, &font->face )) {
-               g_warning("Failed to load '%s', no labelling", filename);
-               g_free(font);
-               return NULL;
+               if (FT_New_Face( gr->gra->library, filename2, 0, &font->face )) {
+                       g_warning("Failed to load '%s', no labelling", filename);
+                       g_free(font);
+                       return NULL;
+               }
        }
         FT_Set_Char_Size(font->face, 0, size, 300, 300);
        return font;