Home | History | Annotate | Download | only in autofit
      1 /***************************************************************************/
      2 /*                                                                         */
      3 /*  afloader.h                                                             */
      4 /*                                                                         */
      5 /*    Auto-fitter glyph loading routines (specification).                  */
      6 /*                                                                         */
      7 /*  Copyright 2003-2005, 2011-2012 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 #ifndef __AFLOADER_H__
     20 #define __AFLOADER_H__
     21 
     22 #include "afhints.h"
     23 #include "afglobal.h"
     24 
     25 
     26 FT_BEGIN_HEADER
     27 
     28   typedef struct AF_ModuleRec_*  AF_Module;
     29 
     30   /*
     31    *  The autofitter module's (global) data structure to communicate with
     32    *  actual fonts.  If necessary, `local' data like the current face, the
     33    *  current face's auto-hint data, or the current glyph's parameters
     34    *  relevant to auto-hinting are `swapped in'.  Cf. functions like
     35    *  `af_loader_reset' and `af_loader_load_g'.
     36    */
     37 
     38   typedef struct  AF_LoaderRec_
     39   {
     40     /* current face data */
     41     FT_Face           face;
     42     AF_FaceGlobals    globals;
     43 
     44     /* current glyph data */
     45     FT_GlyphLoader    gloader;
     46     AF_GlyphHintsRec  hints;
     47     AF_ScriptMetrics  metrics;
     48     FT_Bool           transformed;
     49     FT_Matrix         trans_matrix;
     50     FT_Vector         trans_delta;
     51     FT_Vector         pp1;
     52     FT_Vector         pp2;
     53     /* we don't handle vertical phantom points */
     54 
     55   } AF_LoaderRec, *AF_Loader;
     56 
     57 
     58   FT_LOCAL( FT_Error )
     59   af_loader_init( AF_Module  module );
     60 
     61 
     62   FT_LOCAL( FT_Error )
     63   af_loader_reset( AF_Module  module,
     64                    FT_Face    face );
     65 
     66 
     67   FT_LOCAL( void )
     68   af_loader_done( AF_Module  module );
     69 
     70 
     71   FT_LOCAL( FT_Error )
     72   af_loader_load_glyph( AF_Module  module,
     73                         FT_Face    face,
     74                         FT_UInt    gindex,
     75                         FT_Int32   load_flags );
     76 
     77 /* */
     78 
     79 
     80 FT_END_HEADER
     81 
     82 #endif /* __AFLOADER_H__ */
     83 
     84 
     85 /* END */
     86