aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-04-29 01:40:57 +0000
committerKenichi Handa2009-04-29 01:40:57 +0000
commit518c4881875ff7493ce8ff336ef15c1dc7994618 (patch)
tree246ab0d6da2aa9ed851bd36e3925ae5d9242437d /src
parent1c6bf19606fb25af4bff5582b593c7813501a2c5 (diff)
downloademacs-518c4881875ff7493ce8ff336ef15c1dc7994618.tar.gz
emacs-518c4881875ff7493ce8ff336ef15c1dc7994618.zip
(x_set_font): When ARG is a font-object, check if the
font-object matches with the ASCII font-spec of the frame's fontset. If not, create a new fontset for the frame.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 80a691e35fd..eb9088b5478 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3418,6 +3418,16 @@ x_set_font (f, arg, oldval)
3418 itself in the future. */ 3418 itself in the future. */
3419 arg = AREF (font_object, FONT_NAME_INDEX); 3419 arg = AREF (font_object, FONT_NAME_INDEX);
3420 fontset = FRAME_FONTSET (f); 3420 fontset = FRAME_FONTSET (f);
3421 /* Check if we can use the current fontset. If not, set FONTSET
3422 to -1 to generate a new fontset from FONT-OBJECT. */
3423 if (fontset >= 0)
3424 {
3425 Lisp_Object ascii_font = fontset_ascii (fontset);
3426 Lisp_Object spec = font_spec_from_name (ascii_font);
3427
3428 if (! font_match_p (spec, font_object))
3429 fontset = -1;
3430 }
3421 } 3431 }
3422 else 3432 else
3423 signal_error ("Invalid font", arg); 3433 signal_error ("Invalid font", arg);