comparison src/xfaces.c @ 34629:10675adcbf6f

(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.
author Kenichi Handa <handa@m17n.org>
date Sat, 16 Dec 2000 01:15:05 +0000
parents 1bf333d1b1de
children ddb3abae49ee
comparison
equal deleted inserted replaced
34628:77fd4e6901f9 34629:10675adcbf6f
154 that font selection first tries to find a good match for the font 154 that font selection first tries to find a good match for the font
155 width specified by a face, then---within fonts with that 155 width specified by a face, then---within fonts with that
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
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.
162 169
163 170
164 Character compositition. 171 Character compositition.
165 172
166 Usually, the realization process is already finished when Emacs 173 Usually, the realization process is already finished when Emacs
386 font. Otherwise, value must be a list of regular expressions. A 393 font. Otherwise, value must be a list of regular expressions. A
387 font may be scaled if its name matches a regular expression in the 394 font may be scaled if its name matches a regular expression in the
388 list. */ 395 list. */
389 396
390 Lisp_Object Vscalable_fonts_allowed; 397 Lisp_Object Vscalable_fonts_allowed;
398
399 /* List of regular expressions that matches names of fonts to ignore. */
400
401 Lisp_Object Vface_ignored_fonts;
391 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
395 Lisp_Object Vfont_list_limit; 406 Lisp_Object Vfont_list_limit;
2332 { 2343 {
2333 /* Make a copy of the font names we got from X, and 2344 /* Make a copy of the font names we got from X, and
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
2340 /* Ignore fonts having a name that we can't parse. */ 2363 /* Ignore fonts having a name that we can't parse. */
2341 if (!split_font_name (f, fonts + j, 1)) 2364 if (!split_font_name (f, fonts + j, 1))
7253 Vscalable_fonts_allowed = Qt; 7276 Vscalable_fonts_allowed = Qt;
7254 #else 7277 #else
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\
7283 Each 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);
7261 defsubr (&Sinternal_face_x_get_resource); 7289 defsubr (&Sinternal_face_x_get_resource);
7262 defsubr (&Sx_family_fonts); 7290 defsubr (&Sx_family_fonts);