aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2000-12-16 01:15:05 +0000
committerKenichi Handa2000-12-16 01:15:05 +0000
commitc824bfbc8dfa47330bd5067f8e8d6a73af01d439 (patch)
treee6f0f96cc323a7b3e200eb622a6550d27eb693e3 /src
parent5f3828e1e23268c0c462ff8f7afb473935f63b41 (diff)
downloademacs-c824bfbc8dfa47330bd5067f8e8d6a73af01d439.tar.gz
emacs-c824bfbc8dfa47330bd5067f8e8d6a73af01d439.zip
(Vface_ignored_fonts): New variable.
(x_face_list_fonts): Ignore fonts matching Vface_ignored_fonts. (syms_of_xfaces): Declare Vface_ignored_fonts as a Lisp variable.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 0cfc9a6b334..997f77c3507 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -156,10 +156,17 @@ Boston, MA 02111-1307, USA. */
156 width---tries to find a best match for the specified font height, 156 width---tries to find a best match for the specified font height,
157 etc. 157 etc.
158 158
159 2. Setting face-alternative-font-family-alist allows the user to 159 2. Setting face-font-family-alternatives allows the user to
160 specify alternative font families to try if a family specified by a 160 specify alternative font families to try if a family specified by a
161 face doesn't exist. 161 face doesn't exist.
162 162
163 3. Setting face-font-registry-alternatives allows the user to
164 specify all alternative font registries to try for a face
165 specifying a registry.
166
167 4. Setting face-ignored-fonts allows the user to ignore specific
168 fonts.
169
163 170
164 Character compositition. 171 Character compositition.
165 172
@@ -389,6 +396,10 @@ Lisp_Object Vface_alternative_font_registry_alist;
389 396
390Lisp_Object Vscalable_fonts_allowed; 397Lisp_Object Vscalable_fonts_allowed;
391 398
399/* List of regular expressions that matches names of fonts to ignore. */
400
401Lisp_Object Vface_ignored_fonts;
402
392/* Maximum number of fonts to consider in font_list. If not an 403/* Maximum number of fonts to consider in font_list. If not an
393 integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */ 404 integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */
394 405
@@ -2334,6 +2345,18 @@ x_face_list_fonts (f, pattern, fonts, nfonts, try_alternatives_p,
2334 split them into fields. */ 2345 split them into fields. */
2335 for (i = j = 0; i < n; ++i) 2346 for (i = j = 0; i < n; ++i)
2336 { 2347 {
2348 Lisp_Object elt, tail;
2349
2350 for (tail = Vface_ignored_fonts; CONSP (tail); tail = XCDR (tail))
2351 {
2352 elt = XCAR (tail);
2353 if (STRINGP (elt)
2354 && fast_c_string_match_ignore_case (elt, names[i]) >= 0)
2355 break;
2356 }
2357 if (!NILP (tail))
2358 continue;
2359
2337 /* Make a copy of the font name. */ 2360 /* Make a copy of the font name. */
2338 fonts[j].name = xstrdup (names[i]); 2361 fonts[j].name = xstrdup (names[i]);
2339 2362
@@ -7255,6 +7278,11 @@ scaled if its name matches a regular expression in the list.");
7255 Vscalable_fonts_allowed = Qnil; 7278 Vscalable_fonts_allowed = Qnil;
7256#endif 7279#endif
7257 7280
7281 DEFVAR_LISP ("face-ignored-fonts", &Vface_ignored_fonts,
7282 "List of ignored fonts.\n\
7283Each element is a regular expression that matches names of fonts to ignore.");
7284 Vface_ignored_fonts = Qnil;
7285
7258#ifdef HAVE_WINDOW_SYSTEM 7286#ifdef HAVE_WINDOW_SYSTEM
7259 defsubr (&Sbitmap_spec_p); 7287 defsubr (&Sbitmap_spec_p);
7260 defsubr (&Sx_list_fonts); 7288 defsubr (&Sx_list_fonts);