changeset 306:a8f964718837

[gaim-migrate @ 316] Ok, one last time, for the record: - It tries to load the requested font in the requested size. - It tries to load the requested font at *any* size. - It tries to load either courier or helvetica with the requested features at any size. - It tries to load the other of the two with the requested features at any size. - It tries to load the chosen outgoing font with the requested features at any size, if one exists. - It tries to load courier with no features (bold, italics, etc) at any size. - It tries to load helvetica with no features (bold, italics, etc) at any size. - It tries to load times with no features (bold, italics, etc) at any size. - It tries to load *any* font, generally the first one GDK can find, which ends up usually being something like Arial Bold. It returns after it gets a font, or after it gets *any* font. If you didn't get one, your system is screwy. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 01 Jun 2000 19:27:18 +0000
parents 77404a4692b1
children 721d2dda7be3
files src/gtkhtml.c
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkhtml.c	Thu Jun 01 19:13:00 2000 +0000
+++ b/src/gtkhtml.c	Thu Jun 01 19:27:18 2000 +0000
@@ -476,9 +476,13 @@
 {
 	gchar font_spec[1024];
 
-	g_snprintf(font_spec, sizeof font_spec,
-		"-*-%s-%s-%c-*-*-*-%d-*-*-*-*-*-*",
-		name, weight, slant, size);
+	if (size > 0)
+		g_snprintf(font_spec, sizeof font_spec,
+			"-*-%s-%s-%c-*-*-*-%d-*-*-*-*-*-*",
+			name, weight, slant, size);
+	else
+		g_snprintf(font_spec, sizeof font_spec,
+			"-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
 
 	if((*font_return = g_datalist_id_get_data(&font_cache,
 				g_quark_from_string(font_spec)))) {
@@ -577,9 +581,10 @@
 	 * in gdk? that would be incredibly useful here. there's gotta be a
 	 * better way to do this. */
 	
-	/* well, if they can't do any of the fonts above, they're screwed, might
-	 * as well segfault. */
-	return NULL;
+	/* 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);
+	return my_font;
 }