- Remove svn:needs-lock, svn:eol-type, and svn:eol-tyle properties.
[reactos.git] / reactos / lib / 3rdparty / freetype / src / psaux / psauxmod.c
1 /***************************************************************************/
2 /* */
3 /* psauxmod.c */
4 /* */
5 /* FreeType auxiliary PostScript module implementation (body). */
6 /* */
7 /* Copyright 2000-2001, 2002, 2003, 2006 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 #include <ft2build.h>
20 #include "psauxmod.h"
21 #include "psobjs.h"
22 #include "t1decode.h"
23 #include "t1cmap.h"
24
25 #ifndef T1_CONFIG_OPTION_NO_AFM
26 #include "afmparse.h"
27 #endif
28
29
30 FT_CALLBACK_TABLE_DEF
31 const PS_Table_FuncsRec ps_table_funcs =
32 {
33 ps_table_new,
34 ps_table_done,
35 ps_table_add,
36 ps_table_release
37 };
38
39
40 FT_CALLBACK_TABLE_DEF
41 const PS_Parser_FuncsRec ps_parser_funcs =
42 {
43 ps_parser_init,
44 ps_parser_done,
45 ps_parser_skip_spaces,
46 ps_parser_skip_PS_token,
47 ps_parser_to_int,
48 ps_parser_to_fixed,
49 ps_parser_to_bytes,
50 ps_parser_to_coord_array,
51 ps_parser_to_fixed_array,
52 ps_parser_to_token,
53 ps_parser_to_token_array,
54 ps_parser_load_field,
55 ps_parser_load_field_table
56 };
57
58
59 FT_CALLBACK_TABLE_DEF
60 const T1_Builder_FuncsRec t1_builder_funcs =
61 {
62 t1_builder_init,
63 t1_builder_done,
64 t1_builder_check_points,
65 t1_builder_add_point,
66 t1_builder_add_point1,
67 t1_builder_add_contour,
68 t1_builder_start_point,
69 t1_builder_close_contour
70 };
71
72
73 FT_CALLBACK_TABLE_DEF
74 const T1_Decoder_FuncsRec t1_decoder_funcs =
75 {
76 t1_decoder_init,
77 t1_decoder_done,
78 t1_decoder_parse_charstrings
79 };
80
81
82 #ifndef T1_CONFIG_OPTION_NO_AFM
83 FT_CALLBACK_TABLE_DEF
84 const AFM_Parser_FuncsRec afm_parser_funcs =
85 {
86 afm_parser_init,
87 afm_parser_done,
88 afm_parser_parse
89 };
90 #endif
91
92
93 FT_CALLBACK_TABLE_DEF
94 const T1_CMap_ClassesRec t1_cmap_classes =
95 {
96 &t1_cmap_standard_class_rec,
97 &t1_cmap_expert_class_rec,
98 &t1_cmap_custom_class_rec,
99 &t1_cmap_unicode_class_rec
100 };
101
102
103 static
104 const PSAux_Interface psaux_interface =
105 {
106 &ps_table_funcs,
107 &ps_parser_funcs,
108 &t1_builder_funcs,
109 &t1_decoder_funcs,
110 t1_decrypt,
111
112 (const T1_CMap_ClassesRec*) &t1_cmap_classes,
113
114 #ifndef T1_CONFIG_OPTION_NO_AFM
115 &afm_parser_funcs,
116 #else
117 0,
118 #endif
119 };
120
121
122 FT_CALLBACK_TABLE_DEF
123 const FT_Module_Class psaux_module_class =
124 {
125 0,
126 sizeof( FT_ModuleRec ),
127 "psaux",
128 0x20000L,
129 0x20000L,
130
131 &psaux_interface, /* module-specific interface */
132
133 (FT_Module_Constructor)0,
134 (FT_Module_Destructor) 0,
135 (FT_Module_Requester) 0
136 };
137
138
139 /* END */