win32: handle again gtk-font-name

This code is ugly but it seems to do the work
This commit is contained in:
Ignacio Casal Quinteiro
2014-01-27 09:45:01 +01:00
parent 62fe7ca077
commit 254d35af29

View File

@ -395,7 +395,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
g_value_set_boolean (value, TRUE); g_value_set_boolean (value, TRUE);
return TRUE; return TRUE;
} }
#if 0
/* /*
* With 'MS Sans Serif' as windows menu font (default on win98se) you'll get a * With 'MS Sans Serif' as windows menu font (default on win98se) you'll get a
* bunch of : * bunch of :
@ -412,7 +411,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
/* Pango finally uses GetDeviceCaps to scale, we use simple /* Pango finally uses GetDeviceCaps to scale, we use simple
* approximation here. * approximation here.
*/ */
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? -3*ncm.lfMenuFont.lfHeight/4 : 10); int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision) if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n", GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
name, ncm.lfMenuFont.lfFaceName)); name, ncm.lfMenuFont.lfFaceName));
@ -420,7 +419,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
/* Avoid issues like those described in bug #135098 */ /* Avoid issues like those described in bug #135098 */
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL)) g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
{ {
char* s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight); char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s)); GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
g_value_set_string (value, s); g_value_set_string (value, s);
@ -429,7 +428,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
} }
} }
} }
#endif
return FALSE; return FALSE;
} }