changeset 852:836d5a02a35c

[gaim-migrate @ 862] applying another of decklin's patches (plus some more of my own mods to it... I'll still blame it all on him if it doesn't work though) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 07 Sep 2000 06:03:15 +0000
parents 2cee5577224b
children 050f244b6829
files src/gtkhtml.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkhtml.c	Thu Sep 07 05:50:07 2000 +0000
+++ b/src/gtkhtml.c	Thu Sep 07 06:03:15 2000 +0000
@@ -488,13 +488,10 @@
 		g_snprintf(font_spec, sizeof font_spec,
 			"-*-%s-%s-%c-*-*-*-%d-*-*-*-*-*-*",
 			name, weight, slant, size);
-	else if (size == 0)
+	else
 		g_snprintf(font_spec, sizeof font_spec,
 			"-*-%s-%s-%c-*-*-*-*-*-*-*-*-*-*",
 			name, weight, slant);
-	else
-		g_snprintf(font_spec, sizeof font_spec,
-			"-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
 
 	if((*font_return = g_datalist_id_get_data(&font_cache,
 				g_quark_from_string(font_spec)))) {
@@ -522,11 +519,14 @@
 	if (size < 1) size = 1;
 	size = font_sizes[size-1];
 	
-	/* try both 'i'talic and 'o'blique for italic fonts, and keep
-	 * increasing the size until we get one that works. */	
+	/* try both 'i'talic and 'o'blique for italic fonts */
 
 	if (load_font_with_cache(font, weight, slant, size, &my_font))
 		return my_font;
+	if (load_font_with_cache(font, weight, 'o', size, &my_font))
+		return my_font;
+	if (italic && load_font_with_cache(font, weight, slant, 0, &my_font))
+		return my_font;
 	if (italic && load_font_with_cache(font, weight, 'o', 0, &my_font))
 		return my_font;
 
@@ -577,7 +577,7 @@
 	
 	/* well, if they can't do any of the fonts above, they'll take whatever
 	 * they can get, and be happy about it, damn it. :) */
-	load_font_with_cache("*", "*", '*', -1, &my_font);
+	load_font_with_cache("*", "*", '*', 0, &my_font);
 	return my_font;
 }