Mercurial > emacs
comparison src/macterm.c @ 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 | 88cf9abcfe60 |
children | 797dc38b416e ee12d75eb214 |
comparison
equal
deleted
inserted
replaced
65642:abfd35943fc4 | 65643:44af31946762 |
---|---|
6275 | 6275 |
6276 static INLINE int | 6276 static INLINE int |
6277 xlfdpat_exact_p (pat) | 6277 xlfdpat_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 |
6284 that the pattern in *BLK matches with its prefix. Return NULL | 6284 that the pattern in *BLK matches with its prefix. Return NULL |
6285 there is no such strings. STRING must be lowered in advance. */ | 6285 there is no such strings. STRING must be lowered in advance. */ |
6293 int start, infinity; | 6293 int start, infinity; |
6294 unsigned char *p, *s; | 6294 unsigned char *p, *s; |
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'. */ |
6302 infinity = start_max + blk->len + 1; | 6302 infinity = start_max + blk->len + 1; |
6303 blk->skip[blk->last_char] = infinity; | 6303 blk->skip[blk->last_char] = infinity; |
6681 while (FMGetNextFontFamilyInstance (&ffii, &font, &style, &size) | 6681 while (FMGetNextFontFamilyInstance (&ffii, &font, &style, &size) |
6682 == noErr) | 6682 == noErr) |
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 | 6689 char *cs = SDATA (XCAR (rest)); |
6690 if (size == 0) | 6690 |
6691 { | 6691 if (size == 0) |
6692 add_font_name_table_entry (mac_to_x_fontname (name, size, | 6692 { |
6693 style, cs)); | 6693 add_font_name_table_entry (mac_to_x_fontname (name, size, |
6694 add_font_name_table_entry (mac_to_x_fontname (name, size, | 6694 style, cs)); |
6695 italic, cs)); | 6695 add_font_name_table_entry (mac_to_x_fontname (name, size, |
6696 add_font_name_table_entry (mac_to_x_fontname (name, size, | 6696 italic, cs)); |
6697 bold, cs)); | 6697 add_font_name_table_entry (mac_to_x_fontname (name, size, |
6698 add_font_name_table_entry (mac_to_x_fontname (name, size, | 6698 bold, cs)); |
6699 italic | bold, | 6699 add_font_name_table_entry (mac_to_x_fontname (name, size, |
6700 cs)); | 6700 italic | bold, |
6701 } | 6701 cs)); |
6702 else | 6702 } |
6703 { | 6703 else |
6704 add_font_name_table_entry (mac_to_x_fontname (name, size, | 6704 { |
6705 style, cs)); | 6705 add_font_name_table_entry (mac_to_x_fontname (name, size, |
6706 } | 6706 style, cs)); |
6707 } | 6707 } |
6708 } | |
6708 } | 6709 } |
6709 } | 6710 } |
6710 | 6711 |
6711 UNGCPRO; | 6712 UNGCPRO; |
6712 | 6713 |