zenilib: zenilib/jni/external/freetype2/src/autofit/afmodule.c Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
afmodule.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* afmodule.c */
4 /* */
5 /* Auto-fitter module implementation (body). */
6 /* */
7 /* Copyright 2003-2006, 2009, 2011 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 #include "afmodule.h"
20 #include "afloader.h"
21 #include "afpic.h"
22
23 #ifdef FT_DEBUG_AUTOFIT
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
29
30 #include FT_INTERNAL_OBJECTS_H
31
32
33 typedef struct FT_AutofitterRec_
34 {
35 FT_ModuleRec root;
36 AF_LoaderRec loader[1];
37
38 } FT_AutofitterRec, *FT_Autofitter;
39
40
41 FT_CALLBACK_DEF( FT_Error )
42 af_autofitter_init( FT_Autofitter module )
43 {
44 return af_loader_init( module->loader, module->root.library->memory );
45 }
46
47
48 FT_CALLBACK_DEF( void )
49 af_autofitter_done( FT_Autofitter module )
50 {
51 af_loader_done( module->loader );
52 }
53
54
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 )
61 {
62 FT_UNUSED( size );
63
64 return af_loader_load_glyph( module->loader, slot->face,
65 glyph_index, load_flags );
66 }
67
68
69 FT_DEFINE_AUTOHINTER_SERVICE(
70 af_autofitter_service,
71 NULL,
72 NULL,
73 NULL,
74 (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph )
75
76 FT_DEFINE_MODULE(
77 autofit_module_class,
78
79 FT_MODULE_HINTER,
80 sizeof ( FT_AutofitterRec ),
81
82 "autofitter",
83 0x10000L, /* version 1.0 of the autofitter */
84 0x20000L, /* requires FreeType 2.0 or above */
85
86 (const void*)&AF_AF_AUTOFITTER_SERVICE_GET,
87
88 (FT_Module_Constructor)af_autofitter_init,
89 (FT_Module_Destructor) af_autofitter_done,
90 (FT_Module_Requester) NULL )
91
92
93 /* END */
FT_SizeRec_
Definition: freetype.h:1395
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_DEFINE_AUTOHINTER_SERVICE
FT_DEFINE_AUTOHINTER_SERVICE(af_autofitter_service, NULL, NULL, NULL,(FT_AutoHinter_GlyphLoadFunc) af_autofitter_load_glyph) FT_DEFINE_MODULE(autofit_module_class
AF_LoaderRec
FT_BEGIN_HEADER struct AF_LoaderRec_ AF_LoaderRec
af_loader_load_glyph
af_loader_load_glyph(AF_Loader loader, FT_Face face, FT_UInt gindex, FT_Int32 load_flags)
Definition: afloader.c:487
FT_GlyphSlotRec_
Definition: freetype.h:1605
FT_ModuleRec_
Definition: ftobjs.h:439
NULL
#define NULL
Definition: ftobjs.h:61
FT_Module_Requester
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
Definition: ftmodapi.h:126
AF_AF_AUTOFITTER_SERVICE_GET
const void *& AF_AF_AUTOFITTER_SERVICE_GET
Definition: afmodule.c:82
af_autofitter_load_glyph
af_autofitter_load_glyph(FT_Autofitter module, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: afmodule.c:56
FT_AutofitterRec
struct FT_AutofitterRec_ FT_AutofitterRec
af_autofitter_done
const void FT_Module_Constructor FT_Module_Destructor af_autofitter_done
Definition: afmodule.c:82
afloader.h
FT_Autofitter
struct FT_AutofitterRec_ * FT_Autofitter
afpic.h
FT_DEFINE_MODULE
#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_,interface_, init_, done_, get_interface_)
Definition: ftobjs.h:1317
FT_Module_Destructor
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:109
af_loader_init
af_loader_init(AF_Loader loader, FT_Memory memory)
Definition: afloader.c:28
af_autofitter_init
const void FT_Module_Constructor af_autofitter_init
Definition: afmodule.c:82
FT_CALLBACK_DEF
#define FT_CALLBACK_DEF(x)
Definition: ftconfig.h:554
FT_Module_Constructor
FT_Error(* FT_Module_Constructor)(FT_Module module)
Definition: ftmodapi.h:94
FT_AutoHinter_GlyphLoadFunc
FT_Error(* FT_AutoHinter_GlyphLoadFunc)(FT_AutoHinter hinter, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: autohint.h:175
afmodule.h
FT_MODULE_HINTER
FT_MODULE_HINTER
Definition: afmodule.c:79
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
af_loader_done
af_loader_done(AF_Loader loader)
Definition: afloader.c:74
FT_UNUSED
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
size
GLsizei size
Definition: gl2ext.h:1467