From: YAMAMOTO Mitsuharu Date: Thu, 22 Sep 2005 07:53:45 +0000 (+0000) Subject: (xlfdpat_block_match_1): Fix assertion. X-Git-Tag: emacs-pretest-22.0.90~6991 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c3d233d907a0e5f016fc295fc13565803cd4da0;p=emacs.git (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. --- diff --git a/src/ChangeLog b/src/ChangeLog index e107d2982b5..12479a963d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-09-22 YAMAMOTO Mitsuharu + + * macterm.c (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. + 2005-09-21 YAMAMOTO Mitsuharu * process.c (create_process) [RTU || UNIPLUS || DONT_REOPEN_PTY]: diff --git a/src/macterm.c b/src/macterm.c index 362da7f77c7..d1b5514f47d 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6277,7 +6277,7 @@ static INLINE int 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 @@ xlfdpat_block_match_1 (blk, string, start_max) 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 @@ init_font_name_table () { Lisp_Object rest = XCDR (XCDR (text_encoding_info)); - for (; !NILP (rest); rest = XCDR (rest)) - { - char *cs = SDATA (XCAR (rest)); + 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)); - } - } + 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)); + } + } } }