]>
Commit | Line | Data |
---|---|---|
cabec872 RR |
1 | /***************************************************************************/ |
2 | /* */ | |
3 | /* ahloader.h */ | |
4 | /* */ | |
5 | /* Glyph loader for the auto-hinting module (declaration only). */ | |
6 | /* */ | |
7 | /* Copyright 2000 Catharon Productions Inc. */ | |
8 | /* Author: David Turner */ | |
9 | /* */ | |
10 | /* This file is part of the Catharon Typography Project and shall only */ | |
11 | /* be used, modified, and distributed under the terms of the Catharon */ | |
12 | /* Open Source License that should come with this file under the name */ | |
13 | /* `CatharonLicense.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 | /* Note that this license is compatible with the FreeType license. */ | |
18 | /* */ | |
19 | /***************************************************************************/ | |
20 | ||
21 | ||
22 | /*************************************************************************/ | |
23 | /* */ | |
24 | /* This defines the AH_GlyphLoader type in two different ways: */ | |
25 | /* */ | |
26 | /* - If the module is compiled within FreeType 2, the type is simply a */ | |
27 | /* typedef to FT_GlyphLoader. */ | |
28 | /* */ | |
29 | /* - If the module is compiled as a standalone object, AH_GlyphLoader */ | |
30 | /* has its own implementation. */ | |
31 | /* */ | |
32 | /*************************************************************************/ | |
33 | ||
34 | ||
35 | #ifndef AHLOADER_H | |
36 | #define AHLOADER_H | |
37 | ||
38 | ||
39 | #ifdef _STANDALONE_ | |
40 | ||
41 | typedef struct AH_GlyphLoad_ | |
42 | { | |
43 | FT_Outline outline; /* outline */ | |
44 | FT_UInt num_subglyphs; /* number of subglyphs */ | |
45 | FT_SubGlyph* subglyphs; /* subglyphs */ | |
46 | FT_Vector* extra_points; /* extra points table */ | |
47 | ||
48 | } AH_GlyphLoad; | |
49 | ||
50 | ||
51 | struct AH_GlyphLoader_ | |
52 | { | |
53 | FT_Memory memory; | |
54 | FT_UInt max_points; | |
55 | FT_UInt max_contours; | |
56 | FT_UInt max_subglyphs; | |
57 | FT_Bool use_extra; | |
58 | ||
59 | AH_GlyphLoad base; | |
60 | AH_GlyphLoad current; | |
61 | ||
62 | void* other; /* for possible future extensions */ | |
63 | }; | |
64 | ||
65 | ||
66 | LOCAL_DEF | |
67 | FT_Error AH_GlyphLoader_New( FT_Memory memory, | |
68 | AH_GlyphLoader** aloader ); | |
69 | ||
70 | LOCAL_DEF | |
71 | FT_Error AH_GlyphLoader_Create_Extra( AH_GlyphLoader* loader ); | |
72 | ||
73 | LOCAL_DEF | |
74 | void AH_GlyphLoader_Done( AH_GlyphLoader* loader ); | |
75 | ||
76 | LOCAL_DEF | |
77 | void AH_GlyphLoader_Reset( AH_GlyphLoader* loader ); | |
78 | ||
79 | LOCAL_DEF | |
80 | void AH_GlyphLoader_Rewind( AH_GlyphLoader* loader ); | |
81 | ||
82 | LOCAL_DEF | |
83 | FT_Error AH_GlyphLoader_Check_Points( AH_GlyphLoader* loader, | |
84 | FT_UInt n_points, | |
85 | FT_UInt n_contours ); | |
86 | ||
87 | LOCAL_DEF | |
88 | FT_Error AH_GlyphLoader_Check_Subglyphs( AH_GlyphLoader* loader, | |
89 | FT_UInt n_subs ); | |
90 | ||
91 | LOCAL_DEF | |
92 | void AH_GlyphLoader_Prepare( AH_GlyphLoader* loader ); | |
93 | ||
94 | LOCAL_DEF | |
95 | void AH_GlyphLoader_Add( AH_GlyphLoader* loader ); | |
96 | ||
97 | LOCAL_DEF | |
98 | FT_Error AH_GlyphLoader_Copy_Points( AH_GlyphLoader* target, | |
99 | FT_GlyphLoader* source ); | |
100 | ||
101 | #else /* _STANDALONE */ | |
102 | ||
103 | #include <freetype/internal/ftobjs.h> | |
104 | ||
105 | #define AH_Load FT_GlyphLoad | |
106 | #define AH_Loader FT_GlyphLoader | |
107 | ||
108 | #define ah_loader_new FT_GlyphLoader_New | |
109 | #define ah_loader_done FT_GlyphLoader_Done | |
110 | #define ah_loader_reset FT_GlyphLoader_Reset | |
111 | #define ah_loader_rewind FT_GlyphLoader_Rewind | |
112 | #define ah_loader_create_extra FT_GlyphLoader_Create_Extra | |
113 | #define ah_loader_check_points FT_GlyphLoader_Check_Points | |
114 | #define ah_loader_check_subglyphs FT_GlyphLoader_Check_Subglyphs | |
115 | #define ah_loader_prepare FT_GlyphLoader_Prepare | |
116 | #define ah_loader_add FT_GlyphLoader_Add | |
117 | #define ah_loader_copy_points FT_GlyphLoader_Copy_Points | |
118 | ||
119 | #endif /* _STANDALONE_ */ | |
120 | ||
121 | #endif /* AHLOADER_H */ | |
122 | ||
123 | ||
124 | /* END */ |