changeset 65643:44af31946762

(xlfdpat_block_match_1): Fix assertion. (init_font_name_table) [TARGET_API_MAC_CARBON]: Don't add style variants for a scalable font multiple times.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Thu, 22 Sep 2005 07:53:29 +0000
parents abfd35943fc4
children 24518d918716
files src/macterm.c
diffstat 1 files changed, 25 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/macterm.c	Wed Sep 21 23:12:14 2005 +0000
+++ b/src/macterm.c	Thu Sep 22 07:53:29 2005 +0000
@@ -6277,7 +6277,7 @@
 xlfdpat_exact_p (pat)
      struct xlfdpat *pat;
 {
-  return (pat)->blocks == NULL;
+  return pat->blocks == NULL;
 }
 
 /* Return the first string in STRING + 0, ..., STRING + START_MAX such
@@ -6295,7 +6295,7 @@
 
   xassert (blk->len > 0);
   xassert (start_max + blk->len <= strlen (string));
-  xassert (blk->pattern[blk->len - 1] != '?');
+  xassert (blk->last_char != '?');
 
   /* See the comments in the function `boyer_moore' (search.c) for the
      use of `infinity'.  */
@@ -6683,28 +6683,29 @@
 	{
 	  Lisp_Object rest = XCDR (XCDR (text_encoding_info));
 
-	  for (; !NILP (rest); rest = XCDR (rest))
-	    {
-	      char *cs = SDATA (XCAR (rest));
-
-	      if (size == 0)
-		{
-		  add_font_name_table_entry (mac_to_x_fontname (name, size,
-								style, cs));
-		  add_font_name_table_entry (mac_to_x_fontname (name, size,
-								italic, cs));
-		  add_font_name_table_entry (mac_to_x_fontname (name, size,
-								bold, cs));
-		  add_font_name_table_entry (mac_to_x_fontname (name, size,
-								italic | bold,
-								cs));
-		}
-	      else
-		{
-		  add_font_name_table_entry (mac_to_x_fontname (name, size,
-								style, cs));
-		}
-	    }
+	  if (size > 0 || style == normal)
+	    for (; !NILP (rest); rest = XCDR (rest))
+	      {
+		char *cs = SDATA (XCAR (rest));
+
+		if (size == 0)
+		  {
+		    add_font_name_table_entry (mac_to_x_fontname (name, size,
+								  style, cs));
+		    add_font_name_table_entry (mac_to_x_fontname (name, size,
+								  italic, cs));
+		    add_font_name_table_entry (mac_to_x_fontname (name, size,
+								  bold, cs));
+		    add_font_name_table_entry (mac_to_x_fontname (name, size,
+								  italic | bold,
+								  cs));
+		  }
+		else
+		  {
+		    add_font_name_table_entry (mac_to_x_fontname (name, size,
+								  style, cs));
+		  }
+	      }
 	}
     }