# HG changeset patch # User Eric Warmenhoven # Date 959887638 0 # Node ID a8f9647188378fdfd37cebab09202268ba7757d7 # Parent 77404a4692b1e94068edaeb0cdc92e2dbbb6c158 [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 diff -r 77404a4692b1 -r a8f964718837 src/gtkhtml.c --- 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; }