--- rxvt-unicode/src/rxvtfont.C 2005/02/12 18:55:04 1.67 +++ rxvt-unicode/src/rxvtfont.C 2005/04/26 00:35:00 1.70 @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *---------------------------------------------------------------------*/ #include "../config.h" @@ -132,10 +132,10 @@ { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, #if XFT - { CS_UNICODE, "xft:Bitstream Vera Sans Mono:antialias=false:autohint=true"}, - { CS_UNICODE, "xft:Courier New:antialias=false:autohint=true" }, - { CS_UNICODE, "xft:Andale Mono:antialias=false" }, - { CS_UNICODE, "xft:Arial Unicode MS:antialias=false" }, + { CS_UNICODE, "xft:Bitstream Vera Sans Mono:antialias=false:autohint=true" }, + { CS_UNICODE, "xft:Courier New:antialias=false:autohint=true" }, + { CS_UNICODE, "xft:Andale Mono:antialias=false:autohint=false" }, + { CS_UNICODE, "xft:Arial Unicode MS:antialias=false:autohint=false" }, // FreeMono is usually uglier than x fonts, so try last only. { CS_UNICODE, "xft:FreeMono:autohint=true" }, @@ -718,6 +718,8 @@ if (replace_field (fname, list[i], 6, '0', field_str)) diff += 10; // slightly penalize scalable fonts + else if (replace_field (fname, list[i], 11, '0', "0")) + diff += 300; // more heavily penalize what looks like scaled bitmap fotns if (!set_properties (p, fname)) continue; @@ -743,7 +745,7 @@ font_weight *best = fonts + count - 1; for (font_weight *w = best; w-- > fonts; ) - if (w->diff < best->diff) + if (w->diff <= best->diff) best = w; if (!best->name @@ -1098,7 +1100,7 @@ FcValue v; if (prop.height != rxvt_fontprop::unset - || (FcPatternGet (p, FC_PIXEL_SIZE, 0, &v) != FcResultMatch + && (FcPatternGet (p, FC_PIXEL_SIZE, 0, &v) != FcResultMatch && FcPatternGet (p, FC_SIZE, 0, &v) != FcResultMatch)) FcPatternAddInteger (p, FC_PIXEL_SIZE, prop.height);