- /*
- * Here we have some choices. We can widen the bold font,
- * bolden the wide font, or widen and bolden the standard
- * font. Try them all, in that order!
- */
- if (inst->cfg.widefont.name[0])
- name = guess_derived_font_name(inst->fonts[2], TRUE, FALSE);
- else if (inst->cfg.boldfont.name[0])
- name = guess_derived_font_name(inst->fonts[1], FALSE, TRUE);
- else
- name = guess_derived_font_name(inst->fonts[0], TRUE, TRUE);
- guessed = TRUE;
- }
- inst->fonts[3] = name ? gdk_font_load(name) : NULL;
- if (inst->fonts[3]) {
- set_font_info(inst, 3);
- } else if (!guessed) {
- fprintf(stderr, "%s: unable to load wide/bold font \"%s\"\n", appname,
- inst->cfg.wideboldfont.name);
- exit(1);
+ if (inst->cfg.wideboldfont.name[0]) {
+ name = inst->cfg.wideboldfont.name;
+ guessed = FALSE;
+ } else {
+ /*
+ * Here we have some choices. We can widen the bold font,
+ * bolden the wide font, or widen and bolden the standard
+ * font. Try them all, in that order!
+ */
+ if (inst->cfg.widefont.name[0])
+ name = guess_derived_font_name(inst->fonts[2], TRUE, FALSE);
+ else if (inst->cfg.boldfont.name[0])
+ name = guess_derived_font_name(inst->fonts[1], FALSE, TRUE);
+ else
+ name = guess_derived_font_name(inst->fonts[0], TRUE, TRUE);
+ guessed = TRUE;
+ }
+ inst->fonts[3] = name ? gdk_font_load(name) : NULL;
+ if (inst->fonts[3]) {
+ set_font_info(inst, 3);
+ } else if (!guessed) {
+ fprintf(stderr, "%s: unable to load wide/bold font \"%s\"\n", appname,
+ inst->cfg.wideboldfont.name);
+ exit(1);
+ }
+ if (guessed)
+ sfree(name);