aboutsummaryrefslogtreecommitdiffstats
path: root/src/macterm.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2005-09-22 07:53:45 +0000
committerYAMAMOTO Mitsuharu2005-09-22 07:53:45 +0000
commit7c3d233d907a0e5f016fc295fc13565803cd4da0 (patch)
tree2600c7b315a0dbd0ec8bbe502a570d7acbaf61f7 /src/macterm.c
parent0278364cefed0081a25a60c74af22422f46c2b1f (diff)
downloademacs-7c3d233d907a0e5f016fc295fc13565803cd4da0.tar.gz
emacs-7c3d233d907a0e5f016fc295fc13565803cd4da0.zip
(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.
Diffstat (limited to 'src/macterm.c')
-rw-r--r--src/macterm.c47
1 files changed, 24 insertions, 23 deletions
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
6277xlfdpat_exact_p (pat) 6277xlfdpat_exact_p (pat)
6278 struct xlfdpat *pat; 6278 struct xlfdpat *pat;
6279{ 6279{
6280 return (pat)->blocks == NULL; 6280 return pat->blocks == NULL;
6281} 6281}
6282 6282
6283/* Return the first string in STRING + 0, ..., STRING + START_MAX such 6283/* Return the first string in STRING + 0, ..., STRING + START_MAX such
@@ -6295,7 +6295,7 @@ xlfdpat_block_match_1 (blk, string, start_max)
6295 6295
6296 xassert (blk->len > 0); 6296 xassert (blk->len > 0);
6297 xassert (start_max + blk->len <= strlen (string)); 6297 xassert (start_max + blk->len <= strlen (string));
6298 xassert (blk->pattern[blk->len - 1] != '?'); 6298 xassert (blk->last_char != '?');
6299 6299
6300 /* See the comments in the function `boyer_moore' (search.c) for the 6300 /* See the comments in the function `boyer_moore' (search.c) for the
6301 use of `infinity'. */ 6301 use of `infinity'. */
@@ -6683,28 +6683,29 @@ init_font_name_table ()
6683 { 6683 {
6684 Lisp_Object rest = XCDR (XCDR (text_encoding_info)); 6684 Lisp_Object rest = XCDR (XCDR (text_encoding_info));
6685 6685
6686 for (; !NILP (rest); rest = XCDR (rest)) 6686 if (size > 0 || style == normal)
6687 { 6687 for (; !NILP (rest); rest = XCDR (rest))
6688 char *cs = SDATA (XCAR (rest)); 6688 {
6689 char *cs = SDATA (XCAR (rest));
6689 6690
6690 if (size == 0) 6691 if (size == 0)
6691 { 6692 {
6692 add_font_name_table_entry (mac_to_x_fontname (name, size, 6693 add_font_name_table_entry (mac_to_x_fontname (name, size,
6693 style, cs)); 6694 style, cs));
6694 add_font_name_table_entry (mac_to_x_fontname (name, size, 6695 add_font_name_table_entry (mac_to_x_fontname (name, size,
6695 italic, cs)); 6696 italic, cs));
6696 add_font_name_table_entry (mac_to_x_fontname (name, size, 6697 add_font_name_table_entry (mac_to_x_fontname (name, size,
6697 bold, cs)); 6698 bold, cs));
6698 add_font_name_table_entry (mac_to_x_fontname (name, size, 6699 add_font_name_table_entry (mac_to_x_fontname (name, size,
6699 italic | bold, 6700 italic | bold,
6700 cs)); 6701 cs));
6701 } 6702 }
6702 else 6703 else
6703 { 6704 {
6704 add_font_name_table_entry (mac_to_x_fontname (name, size, 6705 add_font_name_table_entry (mac_to_x_fontname (name, size,
6705 style, cs)); 6706 style, cs));
6706 } 6707 }
6707 } 6708 }
6708 } 6709 }
6709 } 6710 }
6710 6711