1
/***************************************************************************/
5
/* Auto-hinting module implementation (declaration). */
7
/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
8
/* Author: David Turner */
10
/* This file is part of the Catharon Typography Project and shall only */
11
/* be used, modified, and distributed under the terms of the Catharon */
12
/* Open Source License that should come with this file under the name */
13
/* `CatharonLicense.txt'. By continuing to use, modify, or distribute */
14
/* this file you indicate that you have read the license and */
15
/* understand and accept it fully. */
17
/* Note that this license is compatible with the FreeType license. */
19
/***************************************************************************/
28
AH_Hinter ah_debug_hinter = NULL;
29
FT_Bool ah_debug_disable_horz = 0;
30
FT_Bool ah_debug_disable_vert = 0;
33
typedef struct FT_AutoHinterRec_
41
FT_CALLBACK_DEF( FT_Error )
42
ft_autohinter_init( FT_Module module ) /* FT_AutoHinter */
44
FT_AutoHinter autohinter = (FT_AutoHinter)module;
48
error = ah_hinter_new( module->library, &autohinter->hinter );
52
ah_debug_hinter = autohinter->hinter;
59
FT_CALLBACK_DEF( void )
60
ft_autohinter_done( FT_Module module )
62
FT_AutoHinter autohinter = (FT_AutoHinter)module;
65
ah_hinter_done( autohinter->hinter );
68
ah_debug_hinter = NULL;
73
FT_CALLBACK_DEF( FT_Error )
74
ft_autohinter_load_glyph( FT_AutoHinter module,
80
return ah_hinter_load_glyph( module->hinter,
81
slot, size, glyph_index, load_flags );
85
FT_CALLBACK_DEF( void )
86
ft_autohinter_reset_globals( FT_AutoHinter module,
91
if ( face->autohint.data )
92
ah_hinter_done_face_globals( (AH_Face_Globals)(face->autohint.data) );
96
FT_CALLBACK_DEF( void )
97
ft_autohinter_get_globals( FT_AutoHinter module,
102
ah_hinter_get_global_hints( module->hinter, face,
103
global_hints, global_len );
107
FT_CALLBACK_DEF( void )
108
ft_autohinter_done_globals( FT_AutoHinter module,
111
ah_hinter_done_global_hints( module->hinter, global_hints );
115
FT_CALLBACK_TABLE_DEF
116
const FT_AutoHinter_ServiceRec ft_autohinter_service =
118
ft_autohinter_reset_globals,
119
ft_autohinter_get_globals,
120
ft_autohinter_done_globals,
121
ft_autohinter_load_glyph
125
FT_CALLBACK_TABLE_DEF
126
const FT_Module_Class autohint_module_class =
129
sizeof ( FT_AutoHinterRec ),
132
0x10000L, /* version 1.0 of the autohinter */
133
0x20000L, /* requires FreeType 2.0 or above */
135
(const void*) &ft_autohinter_service,
139
0 /* FT_Module_Requester */