changeset 88376:7c109f1a7bcb

(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.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Mar 2002 01:41:06 +0000
parents 38cab5bfa62b
children beebc1deb7f2
files src/fontset.h
diffstat 1 files changed, 23 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.h	Fri Mar 01 01:39:56 2002 +0000
+++ b/src/fontset.h	Fri Mar 01 01:41:06 2002 +0000
@@ -1,6 +1,9 @@
 /* Header for fontset handler.
    Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN.
    Licensed to the Free Software Foundation.
+   Copyright (C) 2001, 2002
+     National Institute of Advanced Industrial Science and Technology (AIST)
+     Registration Number H13PRO009
 
 This file is part of GNU Emacs.
 
@@ -61,25 +64,15 @@
      of lines.  */
   int vertical_centering;
 
-  /* Encodings of the font indexed by CHARSET.  The value is one of
+  /* Encoding type of the font.  The value is one of
      0, 1, 2, or 3:
 	0: code points 0x20..0x7F or 0x2020..0x7F7F are used
 	1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used
 	2: code points 0x20A0..0x7FFF are used
 	3: code points 0xA020..0xFF7F are used
-     For instance, ASCII and Latin-1 characters may use the same font
-     but different code points (ASCII uses 0x20..0x7F and Latin-1 uses
-     0xA0..0xFF).
-
-     If the value can't be decided from information of the font, we
-     consult `font-encoding-alist' to get of the corresponding charset
-     whose default value is defined in lisp/fontset.el.  Since there's
-     no charset whose id is 1, we use encoding[1] to store the
-     encoding information decided by the font itself.
-
      If the member `font_encoder' is not NULL, this member is ignored.
   */
-  unsigned char encoding[MAX_CHARSET + 1];
+  unsigned char encoding_type;
 
   /* The baseline position of a font is normally `ascent' value of the
      font.  However, there exists many fonts which don't set `ascent'
@@ -139,6 +132,17 @@
    to be used.  */
 #define FONT_ENCODING_NOT_DECIDED 255
 
+enum FONT_SPEC_INDEX
+  {
+    FONT_SPEC_FAMILY_INDEX,
+    FONT_SPEC_WEIGHT_INDEX,
+    FONT_SPEC_SLANT_INDEX,
+    FONT_SPEC_SWIDTH_INDEX,
+    FONT_SPEC_ADSTYLE_INDEX,
+    FONT_SPEC_REGISTRY_INDEX,
+    FONT_SPEC_MAX_INDEX
+  };
+
 /* Forward declaration for prototypes.  */
 struct frame;
 
@@ -184,12 +188,11 @@
 struct face;
 
 extern void free_face_fontset P_ ((FRAME_PTR, struct face *));
-extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, int, int));
+extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, struct face *, int));
 extern int face_suitable_for_char_p P_ ((struct face *, int));
 extern int face_for_char P_ ((FRAME_PTR, struct face *, int));
 extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int));
-extern struct font_info *fs_load_font P_ ((struct frame *, int, char *, int,
-					   struct face *));
+extern struct font_info *fs_load_font P_ ((struct frame *, char *));
 extern int fs_query_fontset P_ ((Lisp_Object, int));
 EXFUN (Fquery_fontset, 2);
 extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int));
@@ -201,19 +204,13 @@
 extern Lisp_Object Vfontset_alias_alist;
 extern Lisp_Object Vvertical_centering_font_regexp;
 
-/* Load a font named FONTNAME for displaying character C.  All fonts
-   for frame F is stored in a table pointed by FONT_TABLE.  Return a
-   pointer to the struct font_info of the loaded font.  If loading
-   fails, return 0; If FONTNAME is NULL, the name is taken from the
-   information of FONTSET.  If FONTSET is given, try to load a font
-   whose size matches that of FONTSET, and, the font index is stored
-   in the table for FONTSET.  */
+/* Load a font named FONTNAME on frame F.  All fonts for frame F is
+   stored in a table pointed by FONT_TABLE.  Return a pointer to the
+   struct font_info of the loaded font.  If loading fails, return
+   NULL.  */
 
-#define FS_LOAD_FONT(f, c, fontname, fontset)  \
-  fs_load_font (f, c, fontname, fontset, NULL)
+#define FS_LOAD_FONT(f, fontname) fs_load_font (f, fontname)
 
-#define FS_LOAD_FACE_FONT(f, c, fontname, face) \
-  fs_load_font (f, c, fontname, -1, face)
 
 /* Return an immutable id for font_info FONT_INFO on frame F.  The
    reason for this macro is hat one cannot hold pointers to font_info