aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-03-01 01:41:06 +0000
committerKenichi Handa2002-03-01 01:41:06 +0000
commit5c23ffd551520099dedc8200c75a830f4fd29cc0 (patch)
tree0ba301d46a4459c0e2bd147343cb7394881ffa40 /src
parent38583a692b598c59dffc99a05a786ff1c630e427 (diff)
downloademacs-5c23ffd551520099dedc8200c75a830f4fd29cc0.tar.gz
emacs-5c23ffd551520099dedc8200c75a830f4fd29cc0.zip
(struct font_info): Type of the member encoding_type
changed. (enum FONT_SPEC_INDEX): New enum. (fontset_font_pattern, fs_load_font): Prototype updated. (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
Diffstat (limited to 'src')
-rw-r--r--src/fontset.h49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/fontset.h b/src/fontset.h
index 1a920ac69ec..524a92c274d 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,6 +1,9 @@
1/* Header for fontset handler. 1/* Header for fontset handler.
2 Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN. 2 Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN.
3 Licensed to the Free Software Foundation. 3 Licensed to the Free Software Foundation.
4 Copyright (C) 2001, 2002
5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H13PRO009
4 7
5This file is part of GNU Emacs. 8This file is part of GNU Emacs.
6 9
@@ -61,25 +64,15 @@ struct font_info
61 of lines. */ 64 of lines. */
62 int vertical_centering; 65 int vertical_centering;
63 66
64 /* Encodings of the font indexed by CHARSET. The value is one of 67 /* Encoding type of the font. The value is one of
65 0, 1, 2, or 3: 68 0, 1, 2, or 3:
66 0: code points 0x20..0x7F or 0x2020..0x7F7F are used 69 0: code points 0x20..0x7F or 0x2020..0x7F7F are used
67 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used 70 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used
68 2: code points 0x20A0..0x7FFF are used 71 2: code points 0x20A0..0x7FFF are used
69 3: code points 0xA020..0xFF7F are used 72 3: code points 0xA020..0xFF7F are used
70 For instance, ASCII and Latin-1 characters may use the same font
71 but different code points (ASCII uses 0x20..0x7F and Latin-1 uses
72 0xA0..0xFF).
73
74 If the value can't be decided from information of the font, we
75 consult `font-encoding-alist' to get of the corresponding charset
76 whose default value is defined in lisp/fontset.el. Since there's
77 no charset whose id is 1, we use encoding[1] to store the
78 encoding information decided by the font itself.
79
80 If the member `font_encoder' is not NULL, this member is ignored. 73 If the member `font_encoder' is not NULL, this member is ignored.
81 */ 74 */
82 unsigned char encoding[MAX_CHARSET + 1]; 75 unsigned char encoding_type;
83 76
84 /* The baseline position of a font is normally `ascent' value of the 77 /* The baseline position of a font is normally `ascent' value of the
85 font. However, there exists many fonts which don't set `ascent' 78 font. However, there exists many fonts which don't set `ascent'
@@ -139,6 +132,17 @@ struct font_info
139 to be used. */ 132 to be used. */
140#define FONT_ENCODING_NOT_DECIDED 255 133#define FONT_ENCODING_NOT_DECIDED 255
141 134
135enum FONT_SPEC_INDEX
136 {
137 FONT_SPEC_FAMILY_INDEX,
138 FONT_SPEC_WEIGHT_INDEX,
139 FONT_SPEC_SLANT_INDEX,
140 FONT_SPEC_SWIDTH_INDEX,
141 FONT_SPEC_ADSTYLE_INDEX,
142 FONT_SPEC_REGISTRY_INDEX,
143 FONT_SPEC_MAX_INDEX
144 };
145
142/* Forward declaration for prototypes. */ 146/* Forward declaration for prototypes. */
143struct frame; 147struct frame;
144 148
@@ -184,12 +188,11 @@ extern void (*check_window_system_func) P_ ((void));
184struct face; 188struct face;
185 189
186extern void free_face_fontset P_ ((FRAME_PTR, struct face *)); 190extern void free_face_fontset P_ ((FRAME_PTR, struct face *));
187extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, int, int)); 191extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, struct face *, int));
188extern int face_suitable_for_char_p P_ ((struct face *, int)); 192extern int face_suitable_for_char_p P_ ((struct face *, int));
189extern int face_for_char P_ ((FRAME_PTR, struct face *, int)); 193extern int face_for_char P_ ((FRAME_PTR, struct face *, int));
190extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int)); 194extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int));
191extern struct font_info *fs_load_font P_ ((struct frame *, int, char *, int, 195extern struct font_info *fs_load_font P_ ((struct frame *, char *));
192 struct face *));
193extern int fs_query_fontset P_ ((Lisp_Object, int)); 196extern int fs_query_fontset P_ ((Lisp_Object, int));
194EXFUN (Fquery_fontset, 2); 197EXFUN (Fquery_fontset, 2);
195extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int)); 198extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int));
@@ -201,19 +204,13 @@ extern Lisp_Object Valternate_fontname_alist;
201extern Lisp_Object Vfontset_alias_alist; 204extern Lisp_Object Vfontset_alias_alist;
202extern Lisp_Object Vvertical_centering_font_regexp; 205extern Lisp_Object Vvertical_centering_font_regexp;
203 206
204/* Load a font named FONTNAME for displaying character C. All fonts 207/* Load a font named FONTNAME on frame F. All fonts for frame F is
205 for frame F is stored in a table pointed by FONT_TABLE. Return a 208 stored in a table pointed by FONT_TABLE. Return a pointer to the
206 pointer to the struct font_info of the loaded font. If loading 209 struct font_info of the loaded font. If loading fails, return
207 fails, return 0; If FONTNAME is NULL, the name is taken from the 210 NULL. */
208 information of FONTSET. If FONTSET is given, try to load a font
209 whose size matches that of FONTSET, and, the font index is stored
210 in the table for FONTSET. */
211 211
212#define FS_LOAD_FONT(f, c, fontname, fontset) \ 212#define FS_LOAD_FONT(f, fontname) fs_load_font (f, fontname)
213 fs_load_font (f, c, fontname, fontset, NULL)
214 213
215#define FS_LOAD_FACE_FONT(f, c, fontname, face) \
216 fs_load_font (f, c, fontname, -1, face)
217 214
218/* Return an immutable id for font_info FONT_INFO on frame F. The 215/* Return an immutable id for font_info FONT_INFO on frame F. The
219 reason for this macro is hat one cannot hold pointers to font_info 216 reason for this macro is hat one cannot hold pointers to font_info