[gaim-migrate @ 862]

Thu, 07 Sep 2000 06:03:15 +0000

author
Eric Warmenhoven <warmenhoven@yahoo.com>
date
Thu, 07 Sep 2000 06:03:15 +0000
changeset 852
6f3fd463222a
parent 851
72c46a6785e3
child 853
d52be66e7f38

[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)

src/gtkhtml.c file | annotate | diff | comparison | revisions
--- 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;
 }
 

mercurial