:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / subsys / win32k / freetype / include / freetype / internal / t1types.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  t1types.h                                                              */
4 /*                                                                         */
5 /*    Basic Type1/Type2 type definitions and interface (specification      */
6 /*    only).                                                               */
7 /*                                                                         */
8 /*  Copyright 1996-2000 by                                                 */
9 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
10 /*                                                                         */
11 /*  This file is part of the FreeType project, and may only be used,       */
12 /*  modified, and distributed under the terms of the FreeType project      */
13 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
14 /*  this file you indicate that you have read the license and              */
15 /*  understand and accept it fully.                                        */
16 /*                                                                         */
17 /***************************************************************************/
18
19
20 #ifndef T1TYPES_H
21 #define T1TYPES_H
22
23
24 #include <freetype/t1tables.h>
25 #include <freetype/internal/psnames.h>
26
27
28   /*************************************************************************/
29   /*************************************************************************/
30   /*************************************************************************/
31   /***                                                                   ***/
32   /***                                                                   ***/
33   /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/
34   /***                                                                   ***/
35   /***                                                                   ***/
36   /*************************************************************************/
37   /*************************************************************************/
38   /*************************************************************************/
39
40
41   /*************************************************************************/
42   /*                                                                       */
43   /* <Struct>                                                              */
44   /*    T1_Encoding                                                        */
45   /*                                                                       */
46   /* <Description>                                                         */
47   /*    A structure modeling a custom encoding                             */
48   /*                                                                       */
49   /* <Fields>                                                              */
50   /*    num_chars  :: The number of character codes in the encoding.       */
51   /*                  Usually 256.                                         */
52   /*                                                                       */
53   /*    code_first :: The lowest valid character code in the encoding.     */
54   /*                                                                       */
55   /*    code_last  :: The highest valid character code in the encoding.    */
56   /*                                                                       */
57   /*    char_index :: An array of corresponding glyph indices.             */
58   /*                                                                       */
59   /*    char_name  :: An array of corresponding glyph names.               */
60   /*                                                                       */
61   typedef struct  T1_Encoding_
62   {
63     FT_Int       num_chars;
64     FT_Int       code_first;
65     FT_Int       code_last;
66
67     FT_UShort*   char_index;
68     FT_String**  char_name;
69
70   } T1_Encoding;
71
72
73   typedef enum  T1_EncodingType_
74   {
75         t1_encoding_none = 0,
76         t1_encoding_array,
77         t1_encoding_standard,
78         t1_encoding_expert
79
80   } T1_EncodingType;
81
82
83   typedef struct  T1_Font_
84   {
85
86     /* font info dictionary */
87     T1_FontInfo      font_info;
88
89     /* private dictionary */
90     T1_Private       private_dict;
91
92     /* top-level dictionary */
93     FT_String*       font_name;
94
95     T1_EncodingType  encoding_type;
96     T1_Encoding      encoding;
97
98     FT_Byte*         subrs_block;
99     FT_Byte*         charstrings_block;
100     FT_Byte*         glyph_names_block;
101
102     FT_Int           num_subrs;
103     FT_Byte**        subrs;
104     FT_Int*          subrs_len;
105
106     FT_Int           num_glyphs;
107     FT_String**      glyph_names;       /* array of glyph names       */
108     FT_Byte**        charstrings;       /* array of glyph charstrings */
109     FT_Int*          charstrings_len;
110
111     FT_Byte          paint_type;
112     FT_Byte          font_type;
113     FT_Matrix        font_matrix;
114     FT_BBox          font_bbox;
115     FT_Long          font_id;
116
117     FT_Int           stroke_width;
118
119   } T1_Font;
120
121
122   typedef struct  CID_Subrs_
123   {
124     FT_UInt    num_subrs;
125     FT_Byte**  code;
126     
127   } CID_Subrs;
128
129
130   /*************************************************************************/
131   /*************************************************************************/
132   /*************************************************************************/
133   /***                                                                   ***/
134   /***                                                                   ***/
135   /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/
136   /***                                                                   ***/
137   /***                                                                   ***/
138   /*************************************************************************/
139   /*************************************************************************/
140   /*************************************************************************/
141
142
143   /*************************************************************************/
144   /*                                                                       */
145   /* This structure/class is defined here because it is common to the      */
146   /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
147   /*                                                                       */
148   /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
149   /* are not shared between font drivers, and are thus defined normally in */
150   /* `ttobjs.h'.                                                           */
151   /*                                                                       */
152   /*************************************************************************/
153
154   typedef struct T1_FaceRec_*   T1_Face;
155   typedef struct CID_FaceRec_*  CID_Face;
156
157
158   typedef struct  T1_FaceRec_
159   {
160     FT_FaceRec     root;
161     T1_Font        type1;
162     void*          psnames;
163     void*          afm_data;
164     FT_CharMapRec  charmaprecs[2];
165     FT_CharMap     charmaps[2];
166     PS_Unicodes    unicode_map;
167
168     /* support for Multiple Masters fonts */
169     T1_Blend*      blend;
170
171   } T1_FaceRec;
172
173
174   typedef struct  CID_FaceRec_
175   {
176     FT_FaceRec  root;
177     void*       psnames;
178     CID_Info    cid;
179     void*       afm_data;
180     CID_Subrs*  subrs;
181   
182   } CID_FaceRec;
183
184
185 #endif /* T1TYPES_H */
186
187
188 /* END */