--- rxvt-unicode/src/defaultfont.C 2004/02/09 07:11:49 1.17 +++ rxvt-unicode/src/defaultfont.C 2004/02/21 22:14:00 1.22 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------*; * File: defaultfont.C *----------------------------------------------------------------------* - * Copyright (c) 2003 Marc Lehmann rxvt@plan9.de> + * Copyright (c) 2003-2004 Marc Lehmann * - original version. * * This program is free software; you can redistribute it and/or modify @@ -430,7 +430,7 @@ if (f) { - // the font should really exists now. if not, we have a problem + // the font should really exist now. if not, we have a problem // (e.g. if the user did xset fp rehash just when we were searching fonts). // in that case, just return garbage. bool ret = set_properties (p, f); @@ -762,17 +762,17 @@ void rxvt_font_xft::clear () { - if (f) - { - XftFontClose (DISPLAY, f); - f = 0; - } - if (d) { XftDrawDestroy (d); d = 0; } + + if (f) + { + XftFontClose (DISPLAY, f); + f = 0; + } } rxvt_fontprop @@ -892,8 +892,7 @@ const text_t *text, int len, int fg, int bg) { - if (!d) - d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); + d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); if (bg >= 0 && bg != Color_bg) XftDrawRect (d, &r->PixColors[bg].c, x, y, r->TermWin.fwidth * len, r->TermWin.fheight); @@ -944,7 +943,7 @@ ///////////////////////////////////////////////////////////////////////////// rxvt_fontset::rxvt_fontset (rxvt_t r) -: r(r) +: r (r) { clear (); } @@ -957,7 +956,7 @@ void rxvt_fontset::clear () { - for (rxvt_font **i = fonts.begin (); i != fonts.end(); i++) + for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) FONT_UNREF (*i); fonts.clear (); @@ -1086,7 +1085,7 @@ // we currently need a base-font, no matter what if ((int)fonts.size () <= base_id || !realize_font (base_id)) { - puts ("unable to load specified font(s), falling back to 'fixed'\n"); + puts ("unable to load specified font (s), falling back to 'fixed'\n"); add_fonts ("fixed"); base_id = fonts.size () - 1; }