Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / modules / freetype2 / src / autofit / afmodule.c
blobcd5e1cc218bd61ce7f52688babea66b33ac64b1a
1 /***************************************************************************/
2 /* */
3 /* afmodule.c */
4 /* */
5 /* Auto-fitter module implementation (body). */
6 /* */
7 /* Copyright 2003, 2004, 2005, 2006 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 /***************************************************************************/
19 #include "afmodule.h"
20 #include "afloader.h"
22 #ifdef AF_DEBUG
23 int _af_debug;
24 int _af_debug_disable_horz_hints;
25 int _af_debug_disable_vert_hints;
26 int _af_debug_disable_blue_hints;
27 void* _af_debug_hints;
28 #endif
30 #include FT_INTERNAL_OBJECTS_H
33 typedef struct FT_AutofitterRec_
35 FT_ModuleRec root;
36 AF_LoaderRec loader[1];
38 } FT_AutofitterRec, *FT_Autofitter;
41 FT_CALLBACK_DEF( FT_Error )
42 af_autofitter_init( FT_Autofitter module )
44 return af_loader_init( module->loader, module->root.library->memory );
48 FT_CALLBACK_DEF( void )
49 af_autofitter_done( FT_Autofitter module )
51 af_loader_done( module->loader );
55 FT_CALLBACK_DEF( FT_Error )
56 af_autofitter_load_glyph( FT_Autofitter module,
57 FT_GlyphSlot slot,
58 FT_Size size,
59 FT_UInt glyph_index,
60 FT_Int32 load_flags )
62 FT_UNUSED( size );
64 return af_loader_load_glyph( module->loader, slot->face,
65 glyph_index, load_flags );
69 FT_CALLBACK_TABLE_DEF
70 const FT_AutoHinter_ServiceRec af_autofitter_service =
72 NULL,
73 NULL,
74 NULL,
75 (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph
79 FT_CALLBACK_TABLE_DEF
80 const FT_Module_Class autofit_module_class =
82 FT_MODULE_HINTER,
83 sizeof ( FT_AutofitterRec ),
85 "autofitter",
86 0x10000L, /* version 1.0 of the autofitter */
87 0x20000L, /* requires FreeType 2.0 or above */
89 (const void*)&af_autofitter_service,
91 (FT_Module_Constructor)af_autofitter_init,
92 (FT_Module_Destructor) af_autofitter_done,
93 (FT_Module_Requester) NULL
97 /* END */