From: Kim F. Storm Date: Sat, 20 May 2006 22:01:18 +0000 (+0000) Subject: (best_matching_font): Fix crash in 2006-05-17 change. X-Git-Tag: emacs-pretest-22.0.90~2444 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41a9b76e813b1fd7783acc96fe4083a5dcab84a3;p=emacs.git (best_matching_font): Fix crash in 2006-05-17 change. --- diff --git a/src/xfaces.c b/src/xfaces.c index b65efa7961e..2029f8fe65c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6636,7 +6636,7 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) best = NULL; /* Find the best match among the non-scalable fonts. */ - for (i = 1; i < nfonts; ++i) + for (i = 0; i < nfonts; ++i) if (!font_scalable_p (fonts + i) && better_font_p (specified, fonts + i, best, 1, avgwidth)) { @@ -7073,7 +7073,7 @@ realize_default_face (f) face = realize_face (c, attrs, 0, NULL, DEFAULT_FACE_ID); #ifdef HAVE_WINDOW_SYSTEM -#ifdef HAVE_X_WINDOWS +#ifdef HAVE_X_WINDOWS if (face->font != FRAME_FONT (f)) /* As the font specified for the frame was not acceptable as a font for the default face (perhaps because auto-scaled fonts