[hackers] wmii: new tip (= 1754)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Tue, 06 Feb 2007 03:30:04 +0100

changeset: 1754:266fcc08814f
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Feb 05 21:27:54 2007 -0500
files: draw.c
description:
1up on last commit: Try to load default font before we die.

changeset: 1753:95e47fbe24ce
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Feb 05 21:21:17 2007 -0500
files: draw.c
description:
Actually *try* to load 'fixed' font before we die saying we can't load it.

diff -r b6a27aa09d7a -r 266fcc08814f draw.c
--- a/draw.c Mon Feb 05 19:25:29 2007 -0500
+++ b/draw.c Mon Feb 05 21:27:54 2007 -0500
@@ -57,8 +57,14 @@ loadfont(Blitz *blitz, BlitzFont *font)
                 font->xfont = nil;
                 font->xfont = XLoadQueryFont(blitz->dpy, fontname);
                 if (!font->xfont) {
- fprintf(stderr, "wmii: error, cannot load 'fixed' font\n");
- exit(1);
+ if(!strncmp(fontname, BLITZ_FONT, sizeof(BLITZ_FONT))) {
+ fprintf(stderr, "wmii: error, cannot load '%s' font\n",
+ BLITZ_FONT);
+ exit(1);
+ }
+ free(font->fontstr);
+ font->fontstr = ixp_estrdup(BLITZ_FONT);
+ return loadfont(blitz, font);
                 }
                 font->ascent = font->xfont->ascent;
                 font->descent = font->xfont->descent;
Received on Tue Feb 06 2007 - 03:30:04 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:55 UTC