Mercurial > emacs
comparison src/xfaces.c @ 35040:604d4b3d1054
(set_font_frame_param): Don't do anything for
non-graphical frames.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 04 Jan 2001 13:03:34 +0000 |
parents | 2298014242a6 |
children | ae27a81ee8dc |
comparison
equal
deleted
inserted
replaced
35039:14c95b31ec71 | 35040:604d4b3d1054 |
---|---|
4195 static void | 4195 static void |
4196 set_font_frame_param (frame, lface) | 4196 set_font_frame_param (frame, lface) |
4197 Lisp_Object frame, lface; | 4197 Lisp_Object frame, lface; |
4198 { | 4198 { |
4199 struct frame *f = XFRAME (frame); | 4199 struct frame *f = XFRAME (frame); |
4200 Lisp_Object font_name; | 4200 |
4201 char *font; | 4201 if (FRAME_WINDOW_P (f)) |
4202 | 4202 { |
4203 if (STRINGP (LFACE_FONT (lface))) | 4203 Lisp_Object font_name; |
4204 font_name = LFACE_FONT (lface); | 4204 char *font; |
4205 else | 4205 |
4206 { | 4206 if (STRINGP (LFACE_FONT (lface))) |
4207 /* Choose a font name that reflects LFACE's attributes and has | 4207 font_name = LFACE_FONT (lface); |
4208 the registry and encoding pattern specified in the default | 4208 else |
4209 fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ | 4209 { |
4210 font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); | 4210 /* Choose a font name that reflects LFACE's attributes and has |
4211 if (!font) | 4211 the registry and encoding pattern specified in the default |
4212 error ("No font matches the specified attribute"); | 4212 fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ |
4213 font_name = build_string (font); | 4213 font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); |
4214 xfree (font); | 4214 if (!font) |
4215 } | 4215 error ("No font matches the specified attribute"); |
4216 font_name = build_string (font); | |
4217 xfree (font); | |
4218 } | |
4216 | 4219 |
4217 Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); | 4220 Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); |
4221 } | |
4218 } | 4222 } |
4219 | 4223 |
4220 | 4224 |
4221 /* Update the corresponding face when frame parameter PARAM on frame F | 4225 /* Update the corresponding face when frame parameter PARAM on frame F |
4222 has been assigned the value NEW_VALUE. */ | 4226 has been assigned the value NEW_VALUE. */ |