aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2006-06-16 12:25:51 +0000
committerKenichi Handa2006-06-16 12:25:51 +0000
commit0169d3603b5085ed238feca83b9ab396d3350d8f (patch)
tree11abe1350355239b02f802f3a0af86c10f240c09 /src
parent706b699591d8c634c14ab4ce6a31a23545c553b3 (diff)
downloademacs-0169d3603b5085ed238feca83b9ab396d3350d8f.tar.gz
emacs-0169d3603b5085ed238feca83b9ab396d3350d8f.zip
(x_set_font) [USE_FONT_BACKEND]: Adusted for the change
of x_new_fontset2.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index cafa9b655d4..739b29c897e 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3077,7 +3077,38 @@ x_set_font (f, arg, oldval)
3077 3077
3078#ifdef USE_FONT_BACKEND 3078#ifdef USE_FONT_BACKEND
3079 if (enable_font_backend) 3079 if (enable_font_backend)
3080 fontset_name = result = x_new_fontset2 (f, arg); 3080 {
3081 int fontset = -1;
3082 Lisp_Object font_object;
3083
3084 /* ARG is a fontset name, a font name, or a font object.
3085 In the last case, this function never fail. */
3086 if (STRINGP (arg))
3087 {
3088 fontset = fs_query_fontset (arg, Qnil);
3089 if (fontset < 0)
3090 font_object = font_open_by_name (f, SDATA (arg));
3091 else if (fontset > 0)
3092 {
3093 Lisp_Object ascii_font = fontset_ascii (fontset);
3094
3095 font_object = font_open_by_name (f, SDATA (arg));
3096 }
3097 }
3098 else
3099 font_object = arg;
3100
3101 if (fontset < 0 && ! NILP (font_object))
3102 fontset = new_fontset_from_font (font_object);
3103
3104 if (fontset == 0)
3105 /* Refuse the default fontset. */
3106 result = Qt;
3107 else if (NILP (font_object))
3108 result = Qnil;
3109 else
3110 result = x_new_fontset2 (f, fontset, font_object);
3111 }
3081 else 3112 else
3082 { 3113 {
3083#endif /* USE_FONT_BACKEND */ 3114#endif /* USE_FONT_BACKEND */