comparison src/xterm.c @ 89126:3bbfb5d2bb52

(x_new_fontset): If FONTSETNAME specifies the default fontset, return Qt.
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Sep 2002 04:51:34 +0000
parents 705b93129869
children 5b452d9d5875
comparison
equal deleted inserted replaced
89125:81d88ca705db 89126:3bbfb5d2bb52
12261 } 12261 }
12262 12262
12263 /* Give frame F the fontset named FONTSETNAME as its default font, and 12263 /* Give frame F the fontset named FONTSETNAME as its default font, and
12264 return the full name of that fontset. FONTSETNAME may be a wildcard 12264 return the full name of that fontset. FONTSETNAME may be a wildcard
12265 pattern; in that case, we choose some fontset that fits the pattern. 12265 pattern; in that case, we choose some fontset that fits the pattern.
12266 The return value shows which fontset we chose. */ 12266 The return value shows which fontset we chose.
12267 If FONTSETNAME specifies the default fontset, return Qt.
12268 If an ASCII font specified in the specified fontset can't be
12269 loaded, return Qnil. */
12267 12270
12268 Lisp_Object 12271 Lisp_Object
12269 x_new_fontset (f, fontsetname) 12272 x_new_fontset (f, fontsetname)
12270 struct frame *f; 12273 struct frame *f;
12271 char *fontsetname; 12274 char *fontsetname;
12272 { 12275 {
12273 int fontset = fs_query_fontset (build_string (fontsetname), 0); 12276 int fontset = fs_query_fontset (build_string (fontsetname), 0);
12274 Lisp_Object result; 12277 Lisp_Object result;
12275 12278
12276 if (fontset >= 0 && f->output_data.x->fontset == fontset) 12279 if (fontset > 0 && f->output_data.x->fontset == fontset)
12277 /* This fontset is already set in frame F. There's nothing more 12280 /* This fontset is already set in frame F. There's nothing more
12278 to do. */ 12281 to do. */
12279 return fontset_name (fontset); 12282 return fontset_name (fontset);
12283 else if (fontset == 0)
12284 /* The default fontset can't be the default font. */
12285 return Qt;
12280 12286
12281 if (fontset >= 0) 12287 if (fontset >= 0)
12282 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); 12288 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data));
12283 else 12289 else
12284 result = x_new_font (f, fontsetname); 12290 result = x_new_font (f, fontsetname);