basic faces are realized for CHARSET_ASCII. Frame parameters are
used to fill in unspecified attributes of the default face. */
-/* Define SCALABLE_FONTS to a non-zero value to enable scalable
- font use. Define it to zero to disable scalable font use.
-
- Use of too many or too large scalable fonts can crash XFree86
- servers. That's why I've put the code dealing with scalable fonts
- in #if's. */
-
-#define SCALABLE_FONTS 1
-
#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_WINDOW_SYSTEM
#include "fontset.h"
-#endif
+#endif /* HAVE_WINDOW_SYSTEM */
+
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
#ifdef USE_MOTIF
#include <Xm/Xm.h>
#include <Xm/XmStrDefs.h>
#endif /* USE_MOTIF */
-#endif
+#endif /* HAVE_X_WINDOWS */
#ifdef MSDOS
#include "dosfns.h"
/* For historic reasons, FONT_WIDTH refers to average width on W32,
not maximum as on X. Redefine here. */
#define FONT_WIDTH FONT_MAX_WIDTH
-#endif
+#endif /* WINDOWSNT */
#include "buffer.h"
#include "dispextern.h"
font may be scaled if its name matches a regular expression in the
list. */
-#if SCALABLE_FONTS
Lisp_Object Vscalable_fonts_allowed;
-#endif
/* Maximum number of fonts to consider in font_list. If not an
integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */
return Qnil;
}
-
#endif /* DEBUG_X_COLORS */
+
/* Free colors used on frame F. PIXELS is an array of NPIXELS pixel
color values. Interrupt input must be blocked when this function
is called. */
BLOCK_INPUT;
names = XListFonts (dpy, pattern, nfonts, &n);
UNBLOCK_INPUT;
-#endif
+#endif /* HAVE_X_WINDOWS */
#ifdef WINDOWSNT
/* NTEMACS_TODO : currently this uses w32_list_fonts, but it may be
better to do it the other way around. */
names[i] = XSTRING (XCAR (tem))->data;
tem = XCDR (tem);
}
-#endif
+#endif /* WINDOWSNT */
if (names)
{
xfree (fonts[j].name);
else if (font_scalable_p (fonts + j))
{
-#if SCALABLE_FONTS
if (!scalable_fonts_p
|| !may_use_scalable_font_p (fonts + j, names[i]))
xfree (fonts[j].name);
else
++j;
-#else /* !SCALABLE_FONTS */
- /* Always ignore scalable fonts. */
- xfree (fonts[j].name);
-#endif /* !SCALABLE_FONTS */
}
else
++j;
nfonts = XFASTINT (Vfont_list_limit);
*fonts = (struct font_name *) xmalloc (nfonts * sizeof **fonts);
-#if SCALABLE_FONTS
nfonts = x_face_list_fonts (f, pattern, *fonts, nfonts, 1, 1);
-#else
- nfonts = x_face_list_fonts (f, pattern, *fonts, nfonts, 1, 0);
-#endif
/* Sort the resulting array and return it in *FONTS. If no
fonts were found, make sure to set *FONTS to null. */
return 1;
}
+
#endif /* HAVE_WINDOW_SYSTEM */
if (INTEGERP (frame) && XINT (frame) == 0)
{
Lisp_Object tail;
+ Finternal_set_lisp_face_attribute (face, attr, value, Qt);
FOR_EACH_FRAME (tail, frame)
Finternal_set_lisp_face_attribute (face, attr, value, frame);
- return Finternal_set_lisp_face_attribute (face, attr, value, Qt);
+ return face;
}
/* Set lface to the Lisp attribute vector of FACE. */
else if (EQ (attr, QCbackground))
param = Qscroll_bar_background;
}
-#endif
+#endif /* not WINDOWSNT */
else if (EQ (face, Qborder))
{
/* Changing background color of `border' sets frame parameter
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)),
resource, class, Qnil, Qnil);
UNBLOCK_INPUT;
-#endif
+#endif /* not WINDOWSNT */
return value;
}
}
}
-
#endif /* USE_MOTIF */
#ifdef USE_LUCID
}
-#if SCALABLE_FONTS
-
/* Value is non-zero if FONT is an exact match for face attributes in
SPECIFIED. SPECIFIED is an array of face attribute values in font
sort order. */
return 0;
}
-#endif /* SCALABLE_FONTS != 0 */
/* Return the name of the best matching font for face attributes
abort ();
}
-#if SCALABLE_FONTS
-
- /* Set to 1 */
exact_p = 0;
/* Start with the first non-scalable font in the list. */
else
font_name = build_font_name (best);
-#else /* !SCALABLE_FONTS */
-
- /* Find the best non-scalable font. */
- best = fonts;
-
- for (i = 1; i < nfonts; ++i)
- {
- xassert (!font_scalable_p (fonts + i));
- if (better_font_p (specified, fonts + i, best, 1))
- best = fonts + i;
- }
-
- font_name = build_font_name (best);
-
-#endif /* !SCALABLE_FONTS */
-
/* Free font_name structures. */
free_font_names (fonts, nfonts);
"An alist of defined terminal colors and their RGB values.");
Vtty_defined_color_alist = Qnil;
-#if SCALABLE_FONTS
-
DEFVAR_LISP ("scalable-fonts-allowed", &Vscalable_fonts_allowed,
"Allowed scalable fonts.\n\
A value of nil means don't allow any scalable fonts.\n\
#else
Vscalable_fonts_allowed = Qnil;
#endif
-#endif /* SCALABLE_FONTS */
#ifdef HAVE_WINDOW_SYSTEM
defsubr (&Sbitmap_spec_p);