comparison src/fontset.c @ 101605:b37403eedfa9

(font_for_char): Use assq_no_quit, not assoc_no_quit. (fontset_get_font_group): Remember that no font-group is specified for C.
author Kenichi Handa <handa@m17n.org>
date Wed, 28 Jan 2009 11:50:05 +0000
parents 58bce94ff020
children 97c9e9322753
comparison
equal deleted inserted replaced
101604:8eb53d4d4b78 101605:b37403eedfa9
87 and parent are always nil. 87 and parent are always nil.
88 88
89 An element of a base fontset is a vector of FONT-DEFs which itself 89 An element of a base fontset is a vector of FONT-DEFs which itself
90 is a vector [ FONT-SPEC ENCODING REPERTORY ]. 90 is a vector [ FONT-SPEC ENCODING REPERTORY ].
91 91
92 An element of a realized fontset is nil, t, or a vector of this form: 92 An element of a realized fontset is nil, t, 0, or a vector of this
93 form:
93 94
94 [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF 95 [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF
95 RFONT-DEF0 RFONT-DEF1 ... ] 96 RFONT-DEF0 RFONT-DEF1 ... ]
96 97
97 RFONT-DEFn (i.e. Realized FONT-DEF) has this form: 98 RFONT-DEFn (i.e. Realized FONT-DEF) has this form:
104 The value nil means that we have not yet generated the above vector 105 The value nil means that we have not yet generated the above vector
105 from the base of the fontset. 106 from the base of the fontset.
106 107
107 The value t means that no font is available for the corresponding 108 The value t means that no font is available for the corresponding
108 range of characters. 109 range of characters.
110
111 The value 0 means that no font is available for the corresponding
112 range of characters in this fontset, but may be available in the
113 default fontset.
109 114
110 115
111 A fontset has 9 extra slots. 116 A fontset has 9 extra slots.
112 117
113 The 1st slot: the ID number of the fontset 118 The 1st slot: the ID number of the fontset
472 if (c >= 0) 477 if (c >= 0)
473 font_group = char_table_ref_and_range (base_fontset, c, &from, &to); 478 font_group = char_table_ref_and_range (base_fontset, c, &from, &to);
474 else 479 else
475 font_group = FONTSET_FALLBACK (base_fontset); 480 font_group = FONTSET_FALLBACK (base_fontset);
476 if (NILP (font_group)) 481 if (NILP (font_group))
477 return Qnil; 482 {
483 if (c >= 0)
484 char_table_set_range (fontset, from, to, make_number (0));
485 return Qnil;
486 }
478 font_group = Fcopy_sequence (font_group); 487 font_group = Fcopy_sequence (font_group);
479 for (i = 0; i < ASIZE (font_group); i++) 488 for (i = 0; i < ASIZE (font_group); i++)
480 if (! NILP (AREF (font_group, i))) 489 if (! NILP (AREF (font_group, i)))
481 { 490 {
482 Lisp_Object rfont_def; 491 Lisp_Object rfont_def;