ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.182 by sf-exg, Fri Jul 29 09:41:22 2011 UTC vs.
Revision 1.185 by sf-exg, Thu Jan 19 13:33:43 2012 UTC

22#include "../config.h" 22#include "../config.h"
23#include "rxvt.h" 23#include "rxvt.h"
24#include "rxvtutil.h" 24#include "rxvtutil.h"
25#include "rxvtfont.h" 25#include "rxvtfont.h"
26 26
27#include <cstdlib> 27#include <stdlib.h>
28 28
29#include <inttypes.h> 29#include <inttypes.h>
30 30
31#if XFT 31#if XFT
32# include <fontconfig/fontconfig.h> 32# include <fontconfig/fontconfig.h>
816 XFreeFontNames (list); 816 XFreeFontNames (list);
817 817
818 // this loop only iterates when the guessed font-size is too small 818 // this loop only iterates when the guessed font-size is too small
819 for (;;) 819 for (;;)
820 { 820 {
821 font_weight *best = fonts + count - 1; 821 font_weight *best = fonts;
822 822
823 for (font_weight *w = fonts; w < best; w++) 823 for (font_weight *w = fonts + 1; w < fonts + count; w++)
824 if (w->diff <= best->diff) 824 if (w->diff < best->diff)
825 best = w; 825 best = w;
826 826
827 if (!best->name 827 if (!best->name
828 || !(f = XLoadQueryFont (disp, best->name))) 828 || !(f = XLoadQueryFont (disp, best->name)))
829 break; 829 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines