emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src frame.c


From: Kenichi Handa
Subject: [Emacs-diffs] emacs/src frame.c
Date: Wed, 29 Apr 2009 01:40:58 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   09/04/29 01:40:57

Modified files:
        src            : frame.c 

Log message:
        (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.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/frame.c?cvsroot=emacs&r1=1.415&r2=1.416

Patches:
Index: frame.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/frame.c,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -b -r1.415 -r1.416
--- frame.c     6 Apr 2009 14:54:40 -0000       1.415
+++ frame.c     29 Apr 2009 01:40:57 -0000      1.416
@@ -3418,6 +3418,16 @@
         itself in the future.  */
       arg = AREF (font_object, FONT_NAME_INDEX);
       fontset = FRAME_FONTSET (f);
+      /* Check if we can use the current fontset.  If not, set FONTSET
+        to -1 to generate a new fontset from FONT-OBJECT.  */
+      if (fontset >= 0)
+       {
+         Lisp_Object ascii_font = fontset_ascii (fontset);
+         Lisp_Object spec = font_spec_from_name (ascii_font);
+
+         if (! font_match_p (spec, font_object))
+           fontset = -1;
+       }
     }
   else
     signal_error ("Invalid font", arg);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]