From: Kenichi Handa Date: Wed, 10 Jun 2009 01:27:10 +0000 (+0000) Subject: (font_parse_family_registry): Fix for one-char foundry. X-Git-Tag: emacs-pretest-23.0.95~95 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9903d1e69c79a0260a2747206e48e44b862b9ac1;p=emacs.git (font_parse_family_registry): Fix for one-char foundry. (font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX]. --- diff --git a/src/ChangeLog b/src/ChangeLog index a62284d5916..21b69dc37dd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-06-10 Kenichi Handa + + * font.c (font_parse_family_registry): Fix for one-char foundry. + (font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX]. + 2009-06-09 Dmitry Dzhus (tiny change) * process.c (status_message): Fix handling of multibyte signal diff --git a/src/font.c b/src/font.c index 5adec3e1193..bc21fce3859 100644 --- a/src/font.c +++ b/src/font.c @@ -1844,7 +1844,7 @@ font_parse_family_registry (family, registry, font_spec) p1 = index (p0, '-'); if (p1) { - if ((*p0 != '*' || p1 - p0 > 1) + if ((*p0 != '*' && p1 - p0 > 0) && NILP (AREF (font_spec, FONT_FOUNDRY_INDEX))) Ffont_put (font_spec, QCfoundry, font_intern_prop (p0, p1 - p0, 1)); p1++; @@ -2326,7 +2326,7 @@ font_sort_entities (vec, prefer, frame, best_only) USE_SAFE_ALLOCA; len = ASIZE (vec); - for (i = FONT_WEIGHT_INDEX; i <= FONT_DPI_INDEX; i++) + for (i = FONT_WEIGHT_INDEX; i <= FONT_AVGWIDTH_INDEX; i++) prefer_prop[i] = AREF (prefer, i); if (FLOATP (prefer_prop[FONT_SIZE_INDEX])) prefer_prop[FONT_SIZE_INDEX]