The BIG graph update
[rrdtool.git] / libraries / freetype-2.0.5 / 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-2001 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<ft2build.h>
25 #include FT_TYPE1_TABLES_H
26 #include FT_INTERNAL_POSTSCRIPT_NAMES_H
27
28
29 FT_BEGIN_HEADER
30
31
32   /*************************************************************************/
33   /*************************************************************************/
34   /*************************************************************************/
35   /***                                                                   ***/
36   /***                                                                   ***/
37   /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/
38   /***                                                                   ***/
39   /***                                                                   ***/
40   /*************************************************************************/
41   /*************************************************************************/
42   /*************************************************************************/
43
44
45   /*************************************************************************/
46   /*                                                                       */
47   /* <Struct>                                                              */
48   /*    T1_Encoding                                                        */
49   /*                                                                       */
50   /* <Description>                                                         */
51   /*    A structure modeling a custom encoding.                            */
52   /*                                                                       */
53   /* <Fields>                                                              */
54   /*    num_chars  :: The number of character codes in the encoding.       */
55   /*                  Usually 256.                                         */
56   /*                                                                       */
57   /*    code_first :: The lowest valid character code in the encoding.     */
58   /*                                                                       */
59   /*    code_last  :: The highest valid character code in the encoding.    */
60   /*                                                                       */
61   /*    char_index :: An array of corresponding glyph indices.             */
62   /*                                                                       */
63   /*    char_name  :: An array of corresponding glyph names.               */
64   /*                                                                       */
65   typedef struct  T1_Encoding_
66   {
67     FT_Int       num_chars;
68     FT_Int       code_first;
69     FT_Int       code_last;
70
71     FT_UShort*   char_index;
72     FT_String**  char_name;
73
74   } T1_Encoding;
75
76
77   typedef enum  T1_EncodingType_
78   {
79     t1_encoding_none = 0,
80     t1_encoding_array,
81     t1_encoding_standard,
82     t1_encoding_expert
83
84   } T1_EncodingType;
85
86
87   typedef struct  T1_Font_
88   {
89     /* font info dictionary */
90     T1_FontInfo      font_info;
91
92     /* private dictionary */
93     T1_Private       private_dict;
94
95     /* top-level dictionary */
96     FT_String*       font_name;
97
98     T1_EncodingType  encoding_type;
99     T1_Encoding      encoding;
100
101     FT_Byte*         subrs_block;
102     FT_Byte*         charstrings_block;
103     FT_Byte*         glyph_names_block;
104
105     FT_Int           num_subrs;
106     FT_Byte**        subrs;
107     FT_Int*          subrs_len;
108
109     FT_Int           num_glyphs;
110     FT_String**      glyph_names;       /* array of glyph names       */
111     FT_Byte**        charstrings;       /* array of glyph charstrings */
112     FT_Int*          charstrings_len;
113
114     FT_Byte          paint_type;
115     FT_Byte          font_type;
116     FT_Matrix        font_matrix;
117     FT_Vector        font_offset;
118     FT_BBox          font_bbox;
119     FT_Long          font_id;
120
121     FT_Int           stroke_width;
122
123   } T1_Font;
124
125
126   typedef struct  CID_Subrs_
127   {
128     FT_UInt    num_subrs;
129     FT_Byte**  code;
130
131   } CID_Subrs;
132
133
134   /*************************************************************************/
135   /*************************************************************************/
136   /*************************************************************************/
137   /***                                                                   ***/
138   /***                                                                   ***/
139   /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/
140   /***                                                                   ***/
141   /***                                                                   ***/
142   /*************************************************************************/
143   /*************************************************************************/
144   /*************************************************************************/
145
146
147   /*************************************************************************/
148   /*                                                                       */
149   /* This structure/class is defined here because it is common to the      */
150   /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
151   /*                                                                       */
152   /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
153   /* are not shared between font drivers, and are thus defined normally in */
154   /* `ttobjs.h'.                                                           */
155   /*                                                                       */
156   /*************************************************************************/
157
158   typedef struct T1_FaceRec_*   T1_Face;
159   typedef struct CID_FaceRec_*  CID_Face;
160
161
162   typedef struct  T1_FaceRec_
163   {
164     FT_FaceRec     root;
165     T1_Font        type1;
166     void*          psnames;
167     void*          psaux;
168     void*          afm_data;
169     FT_CharMapRec  charmaprecs[2];
170     FT_CharMap     charmaps[2];
171     PS_Unicodes    unicode_map;
172
173     /* support for Multiple Masters fonts */
174     T1_Blend*      blend;
175
176   } T1_FaceRec;
177
178
179   typedef struct  CID_FaceRec_
180   {
181     FT_FaceRec  root;
182     void*       psnames;
183     void*       psaux;
184     CID_Info    cid;
185     void*       afm_data;
186     CID_Subrs*  subrs;
187
188   } CID_FaceRec;
189
190
191 FT_END_HEADER
192
193 #endif /* __T1TYPES_H__ */
194
195
196 /* END */