]> git.sesse.net Git - casparcg/blob - dependencies/SFML-1.6/extlibs/headers/freetype/internal/ftobjs.h
Subtree merge of old SVN "dependencies" folder into the "master" git branch. You...
[casparcg] / dependencies / SFML-1.6 / extlibs / headers / freetype / internal / ftobjs.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftobjs.h                                                               */
4 /*                                                                         */
5 /*    The FreeType private base classes (specification).                   */
6 /*                                                                         */
7 /*  Copyright 1996-2001, 2002, 2003, 2004, 2005 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   /*************************************************************************/
20   /*                                                                       */
21   /*  This file contains the definition of all internal FreeType classes.  */
22   /*                                                                       */
23   /*************************************************************************/
24
25
26 #ifndef __FTOBJS_H__
27 #define __FTOBJS_H__
28
29 #include <ft2build.h>
30 #include FT_RENDER_H
31 #include FT_SIZES_H
32 #include FT_INTERNAL_MEMORY_H
33 #include FT_INTERNAL_GLYPH_LOADER_H
34 #include FT_INTERNAL_DRIVER_H
35 #include FT_INTERNAL_AUTOHINT_H
36 #include FT_INTERNAL_SERVICE_H
37
38 #ifdef FT_CONFIG_OPTION_INCREMENTAL
39 #include FT_INCREMENTAL_H
40 #endif
41
42
43 FT_BEGIN_HEADER
44
45
46   /*************************************************************************/
47   /*                                                                       */
48   /* Some generic definitions.                                             */
49   /*                                                                       */
50 #ifndef TRUE
51 #define TRUE  1
52 #endif
53
54 #ifndef FALSE
55 #define FALSE  0
56 #endif
57
58 #ifndef NULL
59 #define NULL  (void*)0
60 #endif
61
62
63   /*************************************************************************/
64   /*                                                                       */
65   /* The min and max functions missing in C.  As usual, be careful not to  */
66   /* write things like FT_MIN( a++, b++ ) to avoid side effects.           */
67   /*                                                                       */
68 #define FT_MIN( a, b )  ( (a) < (b) ? (a) : (b) )
69 #define FT_MAX( a, b )  ( (a) > (b) ? (a) : (b) )
70
71 #define FT_ABS( a )     ( (a) < 0 ? -(a) : (a) )
72
73
74 #define FT_PAD_FLOOR( x, n )  ( (x) & ~((n)-1) )
75 #define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + ((n)/2), n )
76 #define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + ((n)-1), n )
77
78 #define FT_PIX_FLOOR( x )     ( (x) & ~63 )
79 #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
80 #define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )
81
82
83   /*
84    *  Return the highest power of 2 that is <= value; this correspond to
85    *  the highest bit in a given 32-bit value.
86    */
87   FT_BASE( FT_UInt32 )
88   ft_highpow2( FT_UInt32  value );
89
90
91   /*************************************************************************/
92   /*************************************************************************/
93   /*************************************************************************/
94   /****                                                                 ****/
95   /****                                                                 ****/
96   /****                       C H A R M A P S                           ****/
97   /****                                                                 ****/
98   /****                                                                 ****/
99   /*************************************************************************/
100   /*************************************************************************/
101   /*************************************************************************/
102
103   /* handle to internal charmap object */
104   typedef struct FT_CMapRec_*              FT_CMap;
105
106   /* handle to charmap class structure */
107   typedef const struct FT_CMap_ClassRec_*  FT_CMap_Class;
108
109   /* internal charmap object structure */
110   typedef struct  FT_CMapRec_
111   {
112     FT_CharMapRec  charmap;
113     FT_CMap_Class  clazz;
114
115   } FT_CMapRec;
116
117   /* typecase any pointer to a charmap handle */
118 #define FT_CMAP( x )              ((FT_CMap)( x ))
119
120   /* obvious macros */
121 #define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id
122 #define FT_CMAP_ENCODING_ID( x )  FT_CMAP( x )->charmap.encoding_id
123 #define FT_CMAP_ENCODING( x )     FT_CMAP( x )->charmap.encoding
124 #define FT_CMAP_FACE( x )         FT_CMAP( x )->charmap.face
125
126
127   /* class method definitions */
128   typedef FT_Error
129   (*FT_CMap_InitFunc)( FT_CMap     cmap,
130                        FT_Pointer  init_data );
131
132   typedef void
133   (*FT_CMap_DoneFunc)( FT_CMap  cmap );
134
135   typedef FT_UInt
136   (*FT_CMap_CharIndexFunc)( FT_CMap    cmap,
137                             FT_UInt32  char_code );
138
139   typedef FT_UInt
140   (*FT_CMap_CharNextFunc)( FT_CMap     cmap,
141                            FT_UInt32  *achar_code );
142
143
144   typedef struct  FT_CMap_ClassRec_
145   {
146     FT_ULong               size;
147     FT_CMap_InitFunc       init;
148     FT_CMap_DoneFunc       done;
149     FT_CMap_CharIndexFunc  char_index;
150     FT_CMap_CharNextFunc   char_next;
151
152   } FT_CMap_ClassRec;
153
154
155   /* create a new charmap and add it to charmap->face */
156   FT_BASE( FT_Error )
157   FT_CMap_New( FT_CMap_Class  clazz,
158                FT_Pointer     init_data,
159                FT_CharMap     charmap,
160                FT_CMap       *acmap );
161
162   /* destroy a charmap and remove it from face's list */
163   FT_BASE( void )
164   FT_CMap_Done( FT_CMap  cmap );
165
166
167   /*************************************************************************/
168   /*                                                                       */
169   /* <Struct>                                                              */
170   /*    FT_Face_InternalRec                                                */
171   /*                                                                       */
172   /* <Description>                                                         */
173   /*    This structure contains the internal fields of each FT_Face        */
174   /*    object.  These fields may change between different releases of     */
175   /*    FreeType.                                                          */
176   /*                                                                       */
177   /* <Fields>                                                              */
178   /*    max_points ::                                                      */
179   /*      The maximal number of points used to store the vectorial outline */
180   /*      of any glyph in this face.  If this value cannot be known in     */
181   /*      advance, or if the face isn't scalable, this should be set to 0. */
182   /*      Only relevant for scalable formats.                              */
183   /*                                                                       */
184   /*    max_contours ::                                                    */
185   /*      The maximal number of contours used to store the vectorial       */
186   /*      outline of any glyph in this face.  If this value cannot be      */
187   /*      known in advance, or if the face isn't scalable, this should be  */
188   /*      set to 0.  Only relevant for scalable formats.                   */
189   /*                                                                       */
190   /*    transform_matrix ::                                                */
191   /*      A 2x2 matrix of 16.16 coefficients used to transform glyph       */
192   /*      outlines after they are loaded from the font.  Only used by the  */
193   /*      convenience functions.                                           */
194   /*                                                                       */
195   /*    transform_delta ::                                                 */
196   /*      A translation vector used to transform glyph outlines after they */
197   /*      are loaded from the font.  Only used by the convenience          */
198   /*      functions.                                                       */
199   /*                                                                       */
200   /*    transform_flags ::                                                 */
201   /*      Some flags used to classify the transform.  Only used by the     */
202   /*      convenience functions.                                           */
203   /*                                                                       */
204   /*    services ::                                                        */
205   /*      A cache for frequently used services.  It should be only         */
206   /*      accessed with the macro `FT_FACE_LOOKUP_SERVICE'.                */
207   /*                                                                       */
208   /*    incremental_interface ::                                           */
209   /*      If non-null, the interface through which glyph data and metrics  */
210   /*      are loaded incrementally for faces that do not provide all of    */
211   /*      this data when first opened.  This field exists only if          */
212   /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
213   /*                                                                       */
214   typedef struct  FT_Face_InternalRec_
215   {
216     FT_UShort           max_points;
217     FT_Short            max_contours;
218
219     FT_Matrix           transform_matrix;
220     FT_Vector           transform_delta;
221     FT_Int              transform_flags;
222
223     FT_ServiceCacheRec  services;
224
225 #ifdef FT_CONFIG_OPTION_INCREMENTAL
226     FT_Incremental_InterfaceRec*  incremental_interface;
227 #endif
228
229   } FT_Face_InternalRec;
230
231
232   /*************************************************************************/
233   /*                                                                       */
234   /* <Struct>                                                              */
235   /*    FT_Slot_InternalRec                                                */
236   /*                                                                       */
237   /* <Description>                                                         */
238   /*    This structure contains the internal fields of each FT_GlyphSlot   */
239   /*    object.  These fields may change between different releases of     */
240   /*    FreeType.                                                          */
241   /*                                                                       */
242   /* <Fields>                                                              */
243   /*    loader            :: The glyph loader object used to load outlines */
244   /*                         into the glyph slot.                          */
245   /*                                                                       */
246   /*    flags             :: Possible values are zero or                   */
247   /*                         FT_GLYPH_OWN_BITMAP.  The latter indicates    */
248   /*                         that the FT_GlyphSlot structure owns the      */
249   /*                         bitmap buffer.                                */
250   /*                                                                       */
251   /*    glyph_transformed :: Boolean.  Set to TRUE when the loaded glyph   */
252   /*                         must be transformed through a specific        */
253   /*                         font transformation.  This is _not_ the same  */
254   /*                         as the face transform set through             */
255   /*                         FT_Set_Transform().                           */
256   /*                                                                       */
257   /*    glyph_matrix      :: The 2x2 matrix corresponding to the glyph     */
258   /*                         transformation, if necessary.                 */
259   /*                                                                       */
260   /*    glyph_delta       :: The 2d translation vector corresponding to    */
261   /*                         the glyph transformation, if necessary.       */
262   /*                                                                       */
263   /*    glyph_hints       :: Format-specific glyph hints management.       */
264   /*                                                                       */
265
266 #define FT_GLYPH_OWN_BITMAP  0x1
267
268   typedef struct  FT_Slot_InternalRec_
269   {
270     FT_GlyphLoader  loader;
271     FT_UInt         flags;
272     FT_Bool         glyph_transformed;
273     FT_Matrix       glyph_matrix;
274     FT_Vector       glyph_delta;
275     void*           glyph_hints;
276
277   } FT_GlyphSlot_InternalRec;
278
279
280   /*************************************************************************/
281   /*************************************************************************/
282   /*************************************************************************/
283   /****                                                                 ****/
284   /****                                                                 ****/
285   /****                         M O D U L E S                           ****/
286   /****                                                                 ****/
287   /****                                                                 ****/
288   /*************************************************************************/
289   /*************************************************************************/
290   /*************************************************************************/
291
292
293   /*************************************************************************/
294   /*                                                                       */
295   /* <Struct>                                                              */
296   /*    FT_ModuleRec                                                       */
297   /*                                                                       */
298   /* <Description>                                                         */
299   /*    A module object instance.                                          */
300   /*                                                                       */
301   /* <Fields>                                                              */
302   /*    clazz   :: A pointer to the module's class.                        */
303   /*                                                                       */
304   /*    library :: A handle to the parent library object.                  */
305   /*                                                                       */
306   /*    memory  :: A handle to the memory manager.                         */
307   /*                                                                       */
308   /*    generic :: A generic structure for user-level extensibility (?).   */
309   /*                                                                       */
310   typedef struct  FT_ModuleRec_
311   {
312     FT_Module_Class*  clazz;
313     FT_Library        library;
314     FT_Memory         memory;
315     FT_Generic        generic;
316
317   } FT_ModuleRec;
318
319
320   /* typecast an object to a FT_Module */
321 #define FT_MODULE( x )          ((FT_Module)( x ))
322 #define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz
323 #define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library
324 #define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory
325
326
327 #define FT_MODULE_IS_DRIVER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
328                                     FT_MODULE_FONT_DRIVER )
329
330 #define FT_MODULE_IS_RENDERER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
331                                       FT_MODULE_RENDERER )
332
333 #define FT_MODULE_IS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
334                                     FT_MODULE_HINTER )
335
336 #define FT_MODULE_IS_STYLER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
337                                     FT_MODULE_STYLER )
338
339 #define FT_DRIVER_IS_SCALABLE( x )  ( FT_MODULE_CLASS( x )->module_flags & \
340                                       FT_MODULE_DRIVER_SCALABLE )
341
342 #define FT_DRIVER_USES_OUTLINES( x )  !( FT_MODULE_CLASS( x )->module_flags & \
343                                          FT_MODULE_DRIVER_NO_OUTLINES )
344
345 #define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
346                                      FT_MODULE_DRIVER_HAS_HINTER )
347
348
349   /*************************************************************************/
350   /*                                                                       */
351   /* <Function>                                                            */
352   /*    FT_Get_Module_Interface                                            */
353   /*                                                                       */
354   /* <Description>                                                         */
355   /*    Finds a module and returns its specific interface as a typeless    */
356   /*    pointer.                                                           */
357   /*                                                                       */
358   /* <Input>                                                               */
359   /*    library     :: A handle to the library object.                     */
360   /*                                                                       */
361   /*    module_name :: The module's name (as an ASCII string).             */
362   /*                                                                       */
363   /* <Return>                                                              */
364   /*    A module-specific interface if available, 0 otherwise.             */
365   /*                                                                       */
366   /* <Note>                                                                */
367   /*    You should better be familiar with FreeType internals to know      */
368   /*    which module to look for, and what its interface is :-)            */
369   /*                                                                       */
370   FT_BASE( const void* )
371   FT_Get_Module_Interface( FT_Library   library,
372                            const char*  mod_name );
373
374   FT_BASE( FT_Pointer )
375   ft_module_get_service( FT_Module    module,
376                          const char*  service_id );
377
378  /* */
379
380
381   /*************************************************************************/
382   /*************************************************************************/
383   /*************************************************************************/
384   /****                                                                 ****/
385   /****                                                                 ****/
386   /****               FACE, SIZE & GLYPH SLOT OBJECTS                   ****/
387   /****                                                                 ****/
388   /****                                                                 ****/
389   /*************************************************************************/
390   /*************************************************************************/
391   /*************************************************************************/
392
393   /* a few macros used to perform easy typecasts with minimal brain damage */
394
395 #define FT_FACE( x )          ((FT_Face)(x))
396 #define FT_SIZE( x )          ((FT_Size)(x))
397 #define FT_SLOT( x )          ((FT_GlyphSlot)(x))
398
399 #define FT_FACE_DRIVER( x )   FT_FACE( x )->driver
400 #define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library
401 #define FT_FACE_MEMORY( x )   FT_FACE( x )->memory
402 #define FT_FACE_STREAM( x )   FT_FACE( x )->stream
403
404 #define FT_SIZE_FACE( x )     FT_SIZE( x )->face
405 #define FT_SLOT_FACE( x )     FT_SLOT( x )->face
406
407 #define FT_FACE_SLOT( x )     FT_FACE( x )->glyph
408 #define FT_FACE_SIZE( x )     FT_FACE( x )->size
409
410
411   /*************************************************************************/
412   /*                                                                       */
413   /* <Function>                                                            */
414   /*    FT_New_GlyphSlot                                                   */
415   /*                                                                       */
416   /* <Description>                                                         */
417   /*    It is sometimes useful to have more than one glyph slot for a      */
418   /*    given face object.  This function is used to create additional     */
419   /*    slots.  All of them are automatically discarded when the face is   */
420   /*    destroyed.                                                         */
421   /*                                                                       */
422   /* <Input>                                                               */
423   /*    face  :: A handle to a parent face object.                         */
424   /*                                                                       */
425   /* <Output>                                                              */
426   /*    aslot :: A handle to a new glyph slot object.                      */
427   /*                                                                       */
428   /* <Return>                                                              */
429   /*    FreeType error code.  0 means success.                             */
430   /*                                                                       */
431   FT_BASE( FT_Error )
432   FT_New_GlyphSlot( FT_Face        face,
433                     FT_GlyphSlot  *aslot );
434
435
436   /*************************************************************************/
437   /*                                                                       */
438   /* <Function>                                                            */
439   /*    FT_Done_GlyphSlot                                                  */
440   /*                                                                       */
441   /* <Description>                                                         */
442   /*    Destroys a given glyph slot.  Remember however that all slots are  */
443   /*    automatically destroyed with its parent.  Using this function is   */
444   /*    not always mandatory.                                              */
445   /*                                                                       */
446   /* <Input>                                                               */
447   /*    slot :: A handle to a target glyph slot.                           */
448   /*                                                                       */
449   FT_BASE( void )
450   FT_Done_GlyphSlot( FT_GlyphSlot  slot );
451
452  /* */
453
454  /*
455   * Free the bitmap of a given glyphslot when needed
456   * (i.e., only when it was allocated with ft_glyphslot_alloc_bitmap).
457   */
458   FT_BASE( void )
459   ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );
460
461
462  /*
463   * Allocate a new bitmap buffer in a glyph slot.
464   */
465   FT_BASE( FT_Error )
466   ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,
467                              FT_ULong      size );
468
469
470  /*
471   * Set the bitmap buffer in a glyph slot to a given pointer.
472   * The buffer will not be freed by a later call to ft_glyphslot_free_bitmap.
473   */
474   FT_BASE( void )
475   ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,
476                            FT_Byte*      buffer );
477
478
479   /*************************************************************************/
480   /*************************************************************************/
481   /*************************************************************************/
482   /****                                                                 ****/
483   /****                                                                 ****/
484   /****                        R E N D E R E R S                        ****/
485   /****                                                                 ****/
486   /****                                                                 ****/
487   /*************************************************************************/
488   /*************************************************************************/
489   /*************************************************************************/
490
491
492 #define FT_RENDERER( x )      ((FT_Renderer)( x ))
493 #define FT_GLYPH( x )         ((FT_Glyph)( x ))
494 #define FT_BITMAP_GLYPH( x )  ((FT_BitmapGlyph)( x ))
495 #define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
496
497
498   typedef struct  FT_RendererRec_
499   {
500     FT_ModuleRec            root;
501     FT_Renderer_Class*      clazz;
502     FT_Glyph_Format         glyph_format;
503     FT_Glyph_Class          glyph_class;
504
505     FT_Raster               raster;
506     FT_Raster_Render_Func   raster_render;
507     FT_Renderer_RenderFunc  render;
508
509   } FT_RendererRec;
510
511
512   /*************************************************************************/
513   /*************************************************************************/
514   /*************************************************************************/
515   /****                                                                 ****/
516   /****                                                                 ****/
517   /****                    F O N T   D R I V E R S                      ****/
518   /****                                                                 ****/
519   /****                                                                 ****/
520   /*************************************************************************/
521   /*************************************************************************/
522   /*************************************************************************/
523
524
525   /* typecast a module into a driver easily */
526 #define FT_DRIVER( x )        ((FT_Driver)(x))
527
528   /* typecast a module as a driver, and get its driver class */
529 #define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz
530
531
532   /*************************************************************************/
533   /*                                                                       */
534   /* <Struct>                                                              */
535   /*    FT_DriverRec                                                       */
536   /*                                                                       */
537   /* <Description>                                                         */
538   /*    The root font driver class.  A font driver is responsible for      */
539   /*    managing and loading font files of a given format.                 */
540   /*                                                                       */
541   /*  <Fields>                                                             */
542   /*     root         :: Contains the fields of the root module class.     */
543   /*                                                                       */
544   /*     clazz        :: A pointer to the font driver's class.  Note that  */
545   /*                     this is NOT root.clazz.  `class' wasn't used      */
546   /*                     as it is a reserved word in C++.                  */
547   /*                                                                       */
548   /*     faces_list   :: The list of faces currently opened by this        */
549   /*                     driver.                                           */
550   /*                                                                       */
551   /*     extensions   :: A typeless pointer to the driver's extensions     */
552   /*                     registry, if they are supported through the       */
553   /*                     configuration macro FT_CONFIG_OPTION_EXTENSIONS.  */
554   /*                                                                       */
555   /*     glyph_loader :: The glyph loader for all faces managed by this    */
556   /*                     driver.  This object isn't defined for unscalable */
557   /*                     formats.                                          */
558   /*                                                                       */
559   typedef struct  FT_DriverRec_
560   {
561     FT_ModuleRec     root;
562     FT_Driver_Class  clazz;
563
564     FT_ListRec       faces_list;
565     void*            extensions;
566
567     FT_GlyphLoader   glyph_loader;
568
569   } FT_DriverRec;
570
571
572   /*************************************************************************/
573   /*************************************************************************/
574   /*************************************************************************/
575   /****                                                                 ****/
576   /****                                                                 ****/
577   /****                       L I B R A R I E S                         ****/
578   /****                                                                 ****/
579   /****                                                                 ****/
580   /*************************************************************************/
581   /*************************************************************************/
582   /*************************************************************************/
583
584
585 /* this hook is used by the TrueType debugger. It must be set to an alternate
586  * truetype bytecode interpreter function
587  */
588 #define FT_DEBUG_HOOK_TRUETYPE            0
589
590
591 /* set this debug hook to a non-null pointer to force unpatented hinting
592  * for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
593  * TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used
594  * during debugging
595  */
596 #define FT_DEBUG_HOOK_UNPATENTED_HINTING  1
597
598
599   /*************************************************************************/
600   /*                                                                       */
601   /* <Struct>                                                              */
602   /*    FT_LibraryRec                                                      */
603   /*                                                                       */
604   /* <Description>                                                         */
605   /*    The FreeType library class.  This is the root of all FreeType      */
606   /*    data.  Use FT_New_Library() to create a library object, and        */
607   /*    FT_Done_Library() to discard it and all child objects.             */
608   /*                                                                       */
609   /* <Fields>                                                              */
610   /*    memory           :: The library's memory object.  Manages memory   */
611   /*                        allocation.                                    */
612   /*                                                                       */
613   /*    generic          :: Client data variable.  Used to extend the      */
614   /*                        Library class by higher levels and clients.    */
615   /*                                                                       */
616   /*    version_major    :: The major version number of the library.       */
617   /*                                                                       */
618   /*    version_minor    :: The minor version number of the library.       */
619   /*                                                                       */
620   /*    version_patch    :: The current patch level of the library.        */
621   /*                                                                       */
622   /*    num_modules      :: The number of modules currently registered     */
623   /*                        within this library.  This is set to 0 for new */
624   /*                        libraries.  New modules are added through the  */
625   /*                        FT_Add_Module() API function.                  */
626   /*                                                                       */
627   /*    modules          :: A table used to store handles to the currently */
628   /*                        registered modules. Note that each font driver */
629   /*                        contains a list of its opened faces.           */
630   /*                                                                       */
631   /*    renderers        :: The list of renderers currently registered     */
632   /*                        within the library.                            */
633   /*                                                                       */
634   /*    cur_renderer     :: The current outline renderer.  This is a       */
635   /*                        shortcut used to avoid parsing the list on     */
636   /*                        each call to FT_Outline_Render().  It is a     */
637   /*                        handle to the current renderer for the         */
638   /*                        FT_GLYPH_FORMAT_OUTLINE format.                */
639   /*                                                                       */
640   /*    auto_hinter      :: XXX                                            */
641   /*                                                                       */
642   /*    raster_pool      :: The raster object's render pool.  This can     */
643   /*                        ideally be changed dynamically at run-time.    */
644   /*                                                                       */
645   /*    raster_pool_size :: The size of the render pool in bytes.          */
646   /*                                                                       */
647   /*    debug_hooks      :: XXX                                            */
648   /*                                                                       */
649   typedef struct  FT_LibraryRec_
650   {
651     FT_Memory          memory;           /* library's memory manager */
652
653     FT_Generic         generic;
654
655     FT_Int             version_major;
656     FT_Int             version_minor;
657     FT_Int             version_patch;
658
659     FT_UInt            num_modules;
660     FT_Module          modules[FT_MAX_MODULES];  /* module objects  */
661
662     FT_ListRec         renderers;        /* list of renderers        */
663     FT_Renderer        cur_renderer;     /* current outline renderer */
664     FT_Module          auto_hinter;
665
666     FT_Byte*           raster_pool;      /* scan-line conversion */
667                                          /* render pool          */
668     FT_ULong           raster_pool_size; /* size of render pool in bytes */
669
670     FT_DebugHook_Func  debug_hooks[4];
671
672   } FT_LibraryRec;
673
674
675   FT_BASE( FT_Renderer )
676   FT_Lookup_Renderer( FT_Library       library,
677                       FT_Glyph_Format  format,
678                       FT_ListNode*     node );
679
680   FT_BASE( FT_Error )
681   FT_Render_Glyph_Internal( FT_Library      library,
682                             FT_GlyphSlot    slot,
683                             FT_Render_Mode  render_mode );
684
685   typedef const char*
686   (*FT_Face_GetPostscriptNameFunc)( FT_Face  face );
687
688   typedef FT_Error
689   (*FT_Face_GetGlyphNameFunc)( FT_Face     face,
690                                FT_UInt     glyph_index,
691                                FT_Pointer  buffer,
692                                FT_UInt     buffer_max );
693
694   typedef FT_UInt
695   (*FT_Face_GetGlyphNameIndexFunc)( FT_Face     face,
696                                     FT_String*  glyph_name );
697
698
699 #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
700
701   /*************************************************************************/
702   /*                                                                       */
703   /* <Function>                                                            */
704   /*    FT_New_Memory                                                      */
705   /*                                                                       */
706   /* <Description>                                                         */
707   /*    Creates a new memory object.                                       */
708   /*                                                                       */
709   /* <Return>                                                              */
710   /*    A pointer to the new memory object.  0 in case of error.           */
711   /*                                                                       */
712   FT_EXPORT( FT_Memory )
713   FT_New_Memory( void );
714
715
716   /*************************************************************************/
717   /*                                                                       */
718   /* <Function>                                                            */
719   /*    FT_Done_Memory                                                     */
720   /*                                                                       */
721   /* <Description>                                                         */
722   /*    Discards memory manager.                                           */
723   /*                                                                       */
724   /* <Input>                                                               */
725   /*    memory :: A handle to the memory manager.                          */
726   /*                                                                       */
727   FT_EXPORT( void )
728   FT_Done_Memory( FT_Memory  memory );
729
730 #endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
731
732
733   /* Define default raster's interface.  The default raster is located in  */
734   /* `src/base/ftraster.c'.                                                */
735   /*                                                                       */
736   /* Client applications can register new rasters through the              */
737   /* FT_Set_Raster() API.                                                  */
738
739 #ifndef FT_NO_DEFAULT_RASTER
740   FT_EXPORT_VAR( FT_Raster_Funcs )  ft_default_raster;
741 #endif
742
743
744 FT_END_HEADER
745
746 #endif /* __FTOBJS_H__ */
747
748
749 /* END */