diff options
| author | Kenichi Handa | 2006-06-16 12:11:10 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-06-16 12:11:10 +0000 |
| commit | 8140317c7b62df97e16ae78d05d8abe7521952ef (patch) | |
| tree | 301425e5ff78d297aa634f476136ff0879f0ade5 | |
| parent | cf574cc08323fd6cfa290620825b817d3adf3037 (diff) | |
| download | emacs-8140317c7b62df97e16ae78d05d8abe7521952ef.tar.gz emacs-8140317c7b62df97e16ae78d05d8abe7521952ef.zip | |
(x_new_fontset2): Change arguments. Both args FONTSET
and FONT_OBJECT must be existing ones.
| -rw-r--r-- | src/xterm.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/src/xterm.c b/src/xterm.c index d5253e27906..4f2bc73c9f9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8172,46 +8172,22 @@ x_new_fontset (f, fontsetname) | |||
| 8172 | 8172 | ||
| 8173 | #ifdef USE_FONT_BACKEND | 8173 | #ifdef USE_FONT_BACKEND |
| 8174 | Lisp_Object | 8174 | Lisp_Object |
| 8175 | x_new_fontset2 (f, fontsetname) | 8175 | x_new_fontset2 (f, fontset, font_object) |
| 8176 | struct frame *f; | 8176 | struct frame *f; |
| 8177 | Lisp_Object fontsetname; | 8177 | int fontset; |
| 8178 | Lisp_Object font_object; | ||
| 8178 | { | 8179 | { |
| 8179 | int fontset; | 8180 | struct font *font = XSAVE_VALUE (font_object)->pointer; |
| 8180 | struct font *font; | ||
| 8181 | XFontStruct *xfont; | ||
| 8182 | |||
| 8183 | if (STRINGP (fontsetname)) | ||
| 8184 | { | ||
| 8185 | fontset = fs_query_fontset (fontsetname, 0); | ||
| 8186 | if (fontset > 0 && f->output_data.x->fontset == fontset) | ||
| 8187 | /* This fontset is already set in frame F. There's nothing more | ||
| 8188 | to do. */ | ||
| 8189 | return fontset_name (fontset); | ||
| 8190 | if (fontset == 0) | ||
| 8191 | /* The default fontset can't be the default font. */ | ||
| 8192 | return Qt; | ||
| 8193 | if (fontset < 0) | ||
| 8194 | fontset = new_fontset_from_font_name (fontsetname); | ||
| 8195 | } | ||
| 8196 | else | ||
| 8197 | fontset = new_fontset_from_font (f, fontsetname); | ||
| 8198 | |||
| 8199 | if (fontset < 0) | ||
| 8200 | return Qnil; | ||
| 8201 | |||
| 8202 | font = fontset_ascii_font (f, fontset); | ||
| 8203 | if (! font) | ||
| 8204 | return Qnil; | ||
| 8205 | xfont = font->font.font; | ||
| 8206 | 8181 | ||
| 8207 | if (FRAME_FONT (f) == xfont) | 8182 | if (FRAME_FONT_OBJECT (f) == font) |
| 8208 | /* This font is already set in frame F. There's nothing more to | 8183 | /* This font is already set in frame F. There's nothing more to |
| 8209 | do. */ | 8184 | do. */ |
| 8210 | return fontset_name (fontset); | 8185 | return fontset_name (fontset); |
| 8211 | 8186 | ||
| 8212 | BLOCK_INPUT; | 8187 | BLOCK_INPUT; |
| 8213 | 8188 | ||
| 8214 | FRAME_FONT (f) = xfont; | 8189 | FRAME_FONT_OBJECT (f) = font; |
| 8190 | FRAME_FONT (f) = font->font.font; | ||
| 8215 | FRAME_BASELINE_OFFSET (f) = font->font.baseline_offset; | 8191 | FRAME_BASELINE_OFFSET (f) = font->font.baseline_offset; |
| 8216 | FRAME_FONTSET (f) = fontset; | 8192 | FRAME_FONTSET (f) = fontset; |
| 8217 | 8193 | ||