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