Home | History | Annotate | Download | only in base

Lines Matching full:loader

5 /*    The FreeType glyph loader (body).                                    */
43 /* The glyph loader is a simple object which is used to load a set of */
48 /* loader.base Is really the bottom of the stack. It describes a */
52 /* loader.current Describes the top of the stack, on which a new */
56 /* Prepare Set up `loader.current' for addition of a new glyph */
61 /* The glyph loader is now a base object. Each driver used to */
68 /* create a new glyph loader */
73 FT_GlyphLoader loader = NULL;
77 if ( !FT_NEW( loader ) )
79 loader->memory = memory;
80 *aloader = loader;
86 /* rewind the glyph loader - reset counters to 0 */
88 FT_GlyphLoader_Rewind( FT_GlyphLoader loader )
90 FT_GlyphLoad base = &loader->base;
91 FT_GlyphLoad current = &loader->current;
102 /* reset the glyph loader, frees all allocated tables */
105 FT_GlyphLoader_Reset( FT_GlyphLoader loader )
107 FT_Memory memory = loader->memory;
110 FT_FREE( loader->base.outline.points );
111 FT_FREE( loader->base.outline.tags );
112 FT_FREE( loader->base.outline.contours );
113 FT_FREE( loader->base.extra_points );
114 FT_FREE( loader->base.subglyphs );
116 loader->base.extra_points2 = NULL;
118 loader->max_points = 0;
119 loader->max_contours = 0;
120 loader->max_subglyphs = 0;
122 FT_GlyphLoader_Rewind( loader );
126 /* delete a glyph loader */
128 FT_GlyphLoader_Done( FT_GlyphLoader loader )
130 if ( loader )
132 FT_Memory memory = loader->memory;
135 FT_GlyphLoader_Reset( loader );
136 FT_FREE( loader );
143 FT_GlyphLoader_Adjust_Points( FT_GlyphLoader loader )
145 FT_Outline* base = &loader->base.outline;
146 FT_Outline* current = &loader->current.outline;
154 if ( loader->use_extra )
156 loader->current.extra_points = loader->base.extra_points +
159 loader->current.extra_points2 = loader->base.extra_points2 +
166 FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader )
169 FT_Memory memory = loader->memory;
172 if ( !FT_NEW_ARRAY( loader->base.extra_points, 2 * loader->max_points ) )
174 loader->use_extra = 1;
175 loader->base.extra_points2 = loader->base.extra_points +
176 loader->max_points;
178 FT_GlyphLoader_Adjust_Points( loader );
186 FT_GlyphLoader_Adjust_Subglyphs( FT_GlyphLoader loader )
188 FT_GlyphLoad base = &loader->base;
189 FT_GlyphLoad current = &loader->current;
198 /* it DOESN'T change the number of points within the loader! */
201 FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
205 FT_Memory memory = loader->memory;
207 FT_Outline* base = &loader->base.outline;
208 FT_Outline* current = &loader->current.outline;
217 old_max = loader->max_points;
230 if ( loader->use_extra )
232 if ( FT_RENEW_ARRAY( loader->base.extra_points,
236 FT_ARRAY_MOVE( loader->base.extra_points + new_max,
237 loader->base.extra_points + old_max,
240 loader->base.extra_points2 = loader->base.extra_points + new_max;
244 loader->max_points = new_max;
248 old_max = loader->max_contours;
262 loader->max_contours = new_max;
266 FT_GlyphLoader_Adjust_Points( loader );
270 FT_GlyphLoader_Reset( loader );
278 /* NOT change the number of subglyphs within the loader! */
281 FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
284 FT_Memory memory = loader->memory;
288 FT_GlyphLoad base = &loader->base;
289 FT_GlyphLoad current = &loader->current;
293 old_max = loader->max_subglyphs;
300 loader->max_subglyphs = new_max;
302 FT_GlyphLoader_Adjust_Subglyphs( loader );
310 /* prepare loader for the addition of a new glyph on top of the base one */
312 FT_GlyphLoader_Prepare( FT_GlyphLoader loader )
314 FT_GlyphLoad current = &loader->current;
321 FT_GlyphLoader_Adjust_Points ( loader );
322 FT_GlyphLoader_Adjust_Subglyphs( loader );
328 FT_GlyphLoader_Add( FT_GlyphLoader loader )
338 if ( !loader )
341 base = &loader->base;
342 current = &loader->current;
360 FT_GlyphLoader_Prepare( loader );