]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_parse_family_registry): Fix for one-char foundry.
authorKenichi Handa <handa@m17n.org>
Wed, 10 Jun 2009 01:27:10 +0000 (01:27 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 10 Jun 2009 01:27:10 +0000 (01:27 +0000)
(font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX].

src/ChangeLog
src/font.c

index a62284d5916f64cba8bde21c22451a518434e7d7..21b69dc37ddeb5ce8189a15ad339aa56f50a3524 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-10  Kenichi Handa  <handa@m17n.org>
+
+       * 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  <dima@sphinx.net.ru>  (tiny change)
 
        * process.c (status_message): Fix handling of multibyte signal
index 5adec3e119371c918b8d20ef0aac5fd4ae776fa5..bc21fce3859292c5c3561990479c4e8d6685c450 100644 (file)
@@ -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]