]> git.eshelyaron.com Git - emacs.git/commitdiff
(Qscalable_fonts_allowed): New variable.
authorGerd Moellmann <gerd@gnu.org>
Wed, 18 Apr 2001 18:53:11 +0000 (18:53 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 18 Apr 2001 18:53:11 +0000 (18:53 +0000)
(realizing_basic_faces_p): Removed.
(x_face_list_fonts): Special handling for realizing_basic_faces_p
removed.
(realize_basic_faces): Specbind Qscalable_fonts_allowed to t.
(syms_of_xfaces): Initialize Qscalable_fonts_allowed.  Change
default for scalable-fonts-allowed to t.

src/ChangeLog
src/xfaces.c

index e5fee939760a10342d2da97b0ec9d686d00a9ea5..6facf4244d7cab1269637f4cb35c6b7087743252 100644 (file)
@@ -1,5 +1,13 @@
 2001-04-18  Gerd Moellmann  <gerd@gnu.org>
 
+       * xfaces.c (Qscalable_fonts_allowed): New variable.
+       (realizing_basic_faces_p): Removed.
+       (x_face_list_fonts): Special handling for realizing_basic_faces_p
+       removed.
+       (realize_basic_faces): Specbind Qscalable_fonts_allowed to t.
+       (syms_of_xfaces): Initialize Qscalable_fonts_allowed.  Change
+       default for scalable-fonts-allowed to t.
+
        * fileio.c (Finsert_file_contents): If the file size returned from
        stat is zero, set END to READ_BUF_SIZE.  This makes sure we can
        read from files on a procfs whose contents are generated
index ac8a771e847fcb95c65a14db9fb1b3b91ecb29c4..24f4c8406e36eb2b2d3724abee2333f83c5785f1 100644 (file)
@@ -403,7 +403,7 @@ Lisp_Object Vface_alternative_font_registry_alist;
    font may be scaled if its name matches a regular expression in the
    list.  */
 
-Lisp_Object Vscalable_fonts_allowed;
+Lisp_Object Vscalable_fonts_allowed, Qscalable_fonts_allowed;
 
 /* List of regular expressions that matches names of fonts to ignore. */
 
@@ -487,10 +487,6 @@ int tty_suppress_bold_inverse_default_colors_p;
 
 static Lisp_Object Vparam_value_alist;
 
-/* Non-zero while realizing the default face.  */
-
-static int realizing_basic_faces_p;
-
 /* The total number of colors currently allocated.  */
 
 #if GLYPH_DEBUG
@@ -2360,23 +2356,6 @@ x_face_list_fonts (f, pattern, fonts, nfonts, try_alternatives_p)
        xfree (fonts[n].name);
     }
 
-  /* If someone specified a default font that's scalable, try
-     to do the right thing.  */
-  if (realizing_basic_faces_p
-      && try_alternatives_p
-      && n == 0
-      && nignored > 0)
-    {
-      for (tem = lfonts; CONSP (tem) && n < nfonts; tem = XCDR (tem))
-       {
-         fonts[n].name = xstrdup (XSTRING (XCAR (tem))->data);
-         if (split_font_name (f, fonts + n, 1))
-           ++n;
-         else
-           xfree (fonts[n].name);
-       }
-    }
-
   /* If no fonts found, try patterns from Valternate_fontname_alist.  */
   if (n == 0 && try_alternatives_p)
     {
@@ -5950,11 +5929,12 @@ realize_basic_faces (f)
      struct frame *f;
 {
   int success_p = 0;
+  int count = BINDING_STACK_SIZE ();
 
   /* Block input there so that we won't be surprised by an X expose
      event, for instance without having the faces set up.  */
   BLOCK_INPUT;
-  realizing_basic_faces_p = 1;
+  specbind (Qscalable_fonts_allowed, Qt);
 
   if (realize_default_face (f))
     {
@@ -5980,7 +5960,7 @@ realize_basic_faces (f)
       success_p = 1;
     }
 
-  realizing_basic_faces_p = 0;
+  unbind_to (count, Qnil);
   UNBLOCK_INPUT;
   return success_p;
 }
@@ -7067,6 +7047,8 @@ syms_of_xfaces ()
   staticpro (&Qtty_color_by_index);
   Qtty_color_alist = intern ("tty-color-alist");
   staticpro (&Qtty_color_alist);
+  Qscalable_fonts_allowed = intern ("scalable-fonts-allowed");
+  staticpro (&Qscalable_fonts_allowed);
 
   Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil);
   staticpro (&Vparam_value_alist);
@@ -7132,13 +7114,7 @@ A value of nil means don't allow any scalable fonts.\n\
 A value of t means allow any scalable font.\n\
 Otherwise, value must be a list of regular expressions.  A font may be\n\
 scaled if its name matches a regular expression in the list.");
-#if defined (WINDOWSNT) || defined (macintosh)
-  /* Windows uses mainly truetype fonts, so disallowing scalable fonts
-     by default limits the fonts available severely. */
   Vscalable_fonts_allowed = Qt;
-#else
-  Vscalable_fonts_allowed = Qnil;
-#endif
 
   DEFVAR_LISP ("face-ignored-fonts", &Vface_ignored_fonts,
     "List of ignored fonts.\n\