changeset 103369:97cfffb6f666

(font_parse_family_registry): Fix for one-char foundry. (font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX].
author Kenichi Handa <handa@m17n.org>
date Wed, 10 Jun 2009 01:26:15 +0000
parents b0b5c45d12f5
children 41ae80668ddd
files src/font.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Wed Jun 10 00:35:08 2009 +0000
+++ b/src/font.c	Wed Jun 10 01:26:15 2009 +0000
@@ -1844,7 +1844,7 @@
       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 @@
   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]