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;
216 old_max = loader->max_points;
229 if ( loader->use_extra )
231 if ( FT_RENEW_ARRAY( loader->base.extra_points,
235 FT_ARRAY_MOVE( loader->base.extra_points + new_max,
236 loader->base.extra_points + old_max,
239 loader->base.extra_points2 = loader->base.extra_points + new_max;
243 loader->max_points = new_max;
247 old_max = loader->max_contours;
261 loader->max_contours = new_max;
265 FT_GlyphLoader_Adjust_Points( loader );
269 FT_GlyphLoader_Reset( loader );
277 /* NOT change the number of subglyphs within the loader! */
280 FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
283 FT_Memory memory = loader->memory;
287 FT_GlyphLoad base = &loader->base;
288 FT_GlyphLoad current = &loader->current;
292 old_max = loader->max_subglyphs;
299 loader->max_subglyphs = new_max;
301 FT_GlyphLoader_Adjust_Subglyphs( loader );
309 /* prepare loader for the addition of a new glyph on top of the base one */
311 FT_GlyphLoader_Prepare( FT_GlyphLoader loader )
313 FT_GlyphLoad current = &loader->current;
320 FT_GlyphLoader_Adjust_Points ( loader );
321 FT_GlyphLoader_Adjust_Subglyphs( loader );
327 FT_GlyphLoader_Add( FT_GlyphLoader loader )
337 if ( !loader )
340 base = &loader->base;
341 current = &loader->current;
359 FT_GlyphLoader_Prepare( loader );