The BIG graph update
[rrdtool.git] / libraries / freetype-2.0.5 / include / psobjs.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  psobjs.h                                                               */
4 /*                                                                         */
5 /*    Auxiliary functions for PostScript fonts (specification).            */
6 /*                                                                         */
7 /*  Copyright 1996-2001 by                                                 */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17
18
19 #ifndef __PSOBJS_H__
20 #define __PSOBJS_H__
21
22
23 #include <ft2build.h>
24 #include FT_INTERNAL_POSTSCRIPT_AUX_H
25
26
27 FT_BEGIN_HEADER
28
29
30   /*************************************************************************/
31   /*************************************************************************/
32   /*****                                                               *****/
33   /*****                             T1_TABLE                          *****/
34   /*****                                                               *****/
35   /*************************************************************************/
36   /*************************************************************************/
37
38
39   FT_CALLBACK_TABLE
40   const PS_Table_Funcs  ps_table_funcs;
41
42   FT_CALLBACK_TABLE
43   const T1_Parser_Funcs  t1_parser_funcs;
44
45   FT_CALLBACK_TABLE
46   const T1_Builder_Funcs  t1_builder_funcs;
47
48
49   FT_LOCAL FT_Error
50   PS_Table_New( PS_Table*  table,
51                 FT_Int     count,
52                 FT_Memory  memory );
53
54   FT_LOCAL FT_Error
55   PS_Table_Add( PS_Table*  table,
56                 FT_Int     index,
57                 void*      object,
58                 FT_Int     length );
59
60   FT_LOCAL void
61   PS_Table_Done( PS_Table*  table );
62
63
64   FT_LOCAL void
65   PS_Table_Release( PS_Table*  table );
66
67
68   /*************************************************************************/
69   /*************************************************************************/
70   /*****                                                               *****/
71   /*****                            T1 PARSER                          *****/
72   /*****                                                               *****/
73   /*************************************************************************/
74   /*************************************************************************/
75
76
77   FT_LOCAL void
78   T1_Skip_Spaces( T1_Parser*  parser );
79
80   FT_LOCAL void
81   T1_Skip_Alpha( T1_Parser*  parser );
82
83   FT_LOCAL void
84   T1_ToToken( T1_Parser*  parser,
85               T1_Token*   token );
86
87   FT_LOCAL void
88   T1_ToTokenArray( T1_Parser*  parser,
89                    T1_Token*   tokens,
90                    FT_UInt     max_tokens,
91                    FT_Int*     pnum_tokens );
92
93   FT_LOCAL FT_Error
94   T1_Load_Field( T1_Parser*       parser,
95                  const T1_Field*  field,
96                  void**           objects,
97                  FT_UInt          max_objects,
98                  FT_ULong*        pflags );
99
100   FT_LOCAL FT_Error
101   T1_Load_Field_Table( T1_Parser*       parser,
102                        const T1_Field*  field,
103                        void**           objects,
104                        FT_UInt          max_objects,
105                        FT_ULong*        pflags );
106
107   FT_LOCAL FT_Long
108   T1_ToInt( T1_Parser*  parser );
109
110
111   FT_LOCAL FT_Fixed
112   T1_ToFixed( T1_Parser*  parser,
113               FT_Int      power_ten );
114
115
116   FT_LOCAL FT_Int
117   T1_ToCoordArray( T1_Parser*  parser,
118                    FT_Int      max_coords,
119                    FT_Short*   coords );
120
121   FT_LOCAL FT_Int
122   T1_ToFixedArray( T1_Parser*  parser,
123                    FT_Int      max_values,
124                    FT_Fixed*   values,
125                    FT_Int      power_ten );
126
127
128   FT_LOCAL void
129   T1_Init_Parser( T1_Parser*  parser,
130                   FT_Byte*    base,
131                   FT_Byte*    limit,
132                   FT_Memory   memory );
133
134   FT_LOCAL void
135   T1_Done_Parser( T1_Parser*  parser );
136
137
138   /*************************************************************************/
139   /*************************************************************************/
140   /*****                                                               *****/
141   /*****                            T1 BUILDER                         *****/
142   /*****                                                               *****/
143   /*************************************************************************/
144   /*************************************************************************/
145
146   FT_LOCAL void
147   T1_Builder_Init( T1_Builder*   builder,
148                    FT_Face       face,
149                    FT_Size       size,
150                    FT_GlyphSlot  glyph );
151
152   FT_LOCAL void
153   T1_Builder_Done( T1_Builder*  builder );
154
155   FT_LOCAL FT_Error
156   T1_Builder_Check_Points( T1_Builder*  builder,
157                            FT_Int       count );
158
159   FT_LOCAL void
160   T1_Builder_Add_Point( T1_Builder*  builder,
161                         FT_Pos       x,
162                         FT_Pos       y,
163                         FT_Byte      flag );
164
165   FT_LOCAL FT_Error
166   T1_Builder_Add_Point1( T1_Builder*  builder,
167                          FT_Pos       x,
168                          FT_Pos       y );
169
170   FT_LOCAL FT_Error
171   T1_Builder_Add_Contour( T1_Builder*  builder );
172
173
174   FT_LOCAL FT_Error
175   T1_Builder_Start_Point( T1_Builder*  builder,
176                           FT_Pos       x,
177                           FT_Pos       y );
178
179
180   FT_LOCAL void
181   T1_Builder_Close_Contour( T1_Builder*  builder );
182
183
184   /*************************************************************************/
185   /*************************************************************************/
186   /*****                                                               *****/
187   /*****                            OTHER                              *****/
188   /*****                                                               *****/
189   /*************************************************************************/
190   /*************************************************************************/
191
192   FT_LOCAL void
193   T1_Decrypt( FT_Byte*   buffer,
194               FT_Offset  length,
195               FT_UShort  seed );
196
197
198 FT_END_HEADER
199
200 #endif /* __PSOBJS_H__ */
201
202
203 /* END */