comparison src/fontset.c @ 88546:7471723e43b0

(Fclear_face_cache): Declare. (accumulate_font_info): Commented-out (unused). (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused variables.
author Dave Love <fx@gnu.org>
date Fri, 17 May 2002 16:29:46 +0000
parents 3d67875ee2b1
children 443aecffdcc5
comparison
equal deleted inserted replaced
88545:2f6c9323d466 88546:7471723e43b0
47 #define xassert(X) do {if (!(X)) abort ();} while (0) 47 #define xassert(X) do {if (!(X)) abort ();} while (0)
48 #undef INLINE 48 #undef INLINE
49 #define INLINE 49 #define INLINE
50 #endif 50 #endif
51 51
52 EXFUN (Fclear_face_cache, 1);
52 53
53 /* FONTSET 54 /* FONTSET
54 55
55 A fontset is a collection of font related information to give 56 A fontset is a collection of font related information to give
56 similar appearance (style, etc) of characters. There are two kinds 57 similar appearance (style, etc) of characters. There are two kinds
437 face_for_char (f, face, c) 438 face_for_char (f, face, c)
438 FRAME_PTR f; 439 FRAME_PTR f;
439 struct face *face; 440 struct face *face;
440 int c; 441 int c;
441 { 442 {
442 Lisp_Object fontset, elt; 443 Lisp_Object fontset;
443 struct face *new_face; 444 struct face *new_face;
444 445
445 xassert (fontset_id_valid_p (face->fontset)); 446 xassert (fontset_id_valid_p (face->fontset));
446 fontset = FONTSET_FROM_ID (face->fontset); 447 fontset = FONTSET_FROM_ID (face->fontset);
447 xassert (!BASE_FONTSET_P (fontset)); 448 xassert (!BASE_FONTSET_P (fontset));
753 754
754 static void 755 static void
755 free_realized_fontsets (base) 756 free_realized_fontsets (base)
756 Lisp_Object base; 757 Lisp_Object base;
757 { 758 {
759 #if 0
758 int id; 760 int id;
759 761
760 #if 0
761 /* For the moment, this doesn't work because free_realized_face 762 /* For the moment, this doesn't work because free_realized_face
762 doesn't remove FACE from a cache. Until we find a solution, we 763 doesn't remove FACE from a cache. Until we find a solution, we
763 suppress this code, and simply use Fclear_face_cache even though 764 suppress this code, and simply use Fclear_face_cache even though
764 that is not efficient. */ 765 that is not efficient. */
765 BLOCK_INPUT; 766 BLOCK_INPUT;
826 (name, charset, font_spec, frame) 827 (name, charset, font_spec, frame)
827 Lisp_Object name, charset, font_spec, frame; 828 Lisp_Object name, charset, font_spec, frame;
828 { 829 {
829 Lisp_Object fontset; 830 Lisp_Object fontset;
830 Lisp_Object family, registry; 831 Lisp_Object family, registry;
831 int charset_id;
832 832
833 fontset = check_fontset_name (name); 833 fontset = check_fontset_name (name);
834 834
835 if (VECTORP (font_spec)) 835 if (VECTORP (font_spec))
836 { 836 {
1049 ? build_string (face->font_name) 1049 ? build_string (face->font_name)
1050 : Qnil); 1050 : Qnil);
1051 } 1051 }
1052 1052
1053 1053
1054 #if 0 /* unused */
1054 /* Called from Ffontset_info via map_char_table on each leaf of 1055 /* Called from Ffontset_info via map_char_table on each leaf of
1055 fontset. ARG is a list (LAST FONT-INFO ...), where LAST is `(last 1056 fontset. ARG is a list (LAST FONT-INFO ...), where LAST is `(last
1056 ARG)' and FONT-INFOs have this form: 1057 ARG)' and FONT-INFOs have this form:
1057 (CHAR FONT-SPEC) or ((FROM . TO) FONT-SPEC) 1058 (CHAR FONT-SPEC) or ((FROM . TO) FONT-SPEC)
1058 The current leaf is indexed by CHARACTER and has value ELT. This 1059 The current leaf is indexed by CHARACTER and has value ELT. This
1094 } 1095 }
1095 } 1096 }
1096 XSETCDR (last, Fcons (Fcons (character, Fcons (elt, Qnil)), Qnil)); 1097 XSETCDR (last, Fcons (Fcons (character, Fcons (elt, Qnil)), Qnil));
1097 XSETCAR (arg, XCDR (last)); 1098 XSETCAR (arg, XCDR (last));
1098 } 1099 }
1099 1100 #endif /* 0 */
1100 1101
1101 DEFUN ("fontset-info", Ffontset_info, Sfontset_info, 1, 2, 0, 1102 DEFUN ("fontset-info", Ffontset_info, Sfontset_info, 1, 2, 0,
1102 doc: /* Return information about a fontset named NAME on frame FRAME. 1103 doc: /* Return information about a fontset named NAME on frame FRAME.
1103 The value is a vector: 1104 The value is a vector:
1104 [ SIZE HEIGHT ((CHARSET-OR-RANGE FONT-SPEC OPENED ...) ...) ], 1105 [ SIZE HEIGHT ((CHARSET-OR-RANGE FONT-SPEC OPENED ...) ...) ],
1180 1181
1181 /* If fonts are opened for FONT-SPEC, append the names of the fonts to 1182 /* If fonts are opened for FONT-SPEC, append the names of the fonts to
1182 FONT-SPEC. */ 1183 FONT-SPEC. */
1183 for (tail = val; CONSP (tail); tail = XCDR (tail)) 1184 for (tail = val; CONSP (tail); tail = XCDR (tail))
1184 { 1185 {
1185 int c;
1186
1187 elt = XCAR (tail); 1186 elt = XCAR (tail);
1188 for (i = 0; i < n_realized; i++) 1187 for (i = 0; i < n_realized; i++)
1189 { 1188 {
1190 int face_id;
1191 struct face *face;
1192 Lisp_Object face_list, fontname; 1189 Lisp_Object face_list, fontname;
1193 1190
1194 for (face_list = FONTSET_FACE_ALIST (realized[i]); 1191 for (face_list = FONTSET_FACE_ALIST (realized[i]);
1195 CONSP (face_list); face_list = XCDR (face_list)) 1192 CONSP (face_list); face_list = XCDR (face_list))
1196 { 1193 {