]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
if a font was not found, fall back to fixed or courier new - should fix "missing...
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 28 Apr 2009 12:48:47 +0000 (12:48 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 28 Apr 2009 12:48:47 +0000 (12:48 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@352 61c419a2-8eb2-4b30-bcec-8cead039b335

libs/gtkutil/glfont.cpp

index 13d16fdbd7c78d98debe9f3624d799d108115190..d2d3b8704301f178610fc10a4f41f5ef1a5478f3 100644 (file)
@@ -113,6 +113,20 @@ GLFont glfont_create(const char* font_string)
 
   PangoFont* font = gdk_gl_font_use_pango_font (font_desc, 0, 256, font_list_base);
 
+  if(font == 0)
+  {
+         pango_font_description_free (font_desc);
+         font_desc = pango_font_description_from_string ("fixed 8");
+         font = gdk_gl_font_use_pango_font (font_desc, 0, 256, font_list_base);
+  }
+
+  if(font == 0)
+  {
+         pango_font_description_free (font_desc);
+         font_desc = pango_font_description_from_string ("courier new 8");
+         font = gdk_gl_font_use_pango_font (font_desc, 0, 256, font_list_base);
+  }
+
   if(font != 0)
   {
     PangoFontMetrics* font_metrics = pango_font_get_metrics (font, 0);