25#ifdef FT_DEBUG_AUTOFIT
27#ifndef FT_MAKE_OPTION_SINGLE_OBJECT
47 int _af_debug_disable_horz_hints;
48 int _af_debug_disable_vert_hints;
49 int _af_debug_disable_blue_hints;
54 void* _af_debug_hints = _af_debug_hints_rec;
57#include FT_INTERNAL_OBJECTS_H
58#include FT_INTERNAL_DEBUG_H
60#include FT_SERVICE_PROPERTIES_H
70#define FT_COMPONENT trace_afmodule
83 return FT_THROW( Invalid_Face_Handle );
95 face->autohint.finalizer =
107#ifdef FT_CONFIG_OPTION_PIC
109#undef AF_SCRIPT_CLASSES_GET
110#define AF_SCRIPT_CLASSES_GET \
111 ( GET_PIC( ft_module->library )->af_script_classes )
113#undef AF_STYLE_CLASSES_GET
114#define AF_STYLE_CLASSES_GET \
115 ( GET_PIC( ft_module->library )->af_style_classes )
122 const char* property_name,
129#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
134 if ( !
ft_strcmp( property_name,
"fallback-script" ) )
140#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
141 if ( value_is_string )
142 return FT_THROW( Invalid_Argument );
165 FT_TRACE0((
"af_property_set: Invalid value %d for property `%s'\n",
166 fallback_script, property_name ));
167 return FT_THROW( Invalid_Argument );
172 else if ( !
ft_strcmp( property_name,
"default-script" ) )
177#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
178 if ( value_is_string )
179 return FT_THROW( Invalid_Argument );
184 module->default_script = *default_script;
188 else if ( !
ft_strcmp( property_name,
"increase-x-height" ) )
194#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
195 if ( value_is_string )
196 return FT_THROW( Invalid_Argument );
207#ifdef AF_CONFIG_OPTION_USE_WARPER
208 else if ( !
ft_strcmp( property_name,
"warping" ) )
210#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
211 if ( value_is_string )
213 const char*
s = (
const char*)
value;
222 return FT_THROW( Invalid_Argument );
230 module->warping = *warping;
236 else if ( !
ft_strcmp( property_name,
"darkening-parameters" ) )
241#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
245 if ( value_is_string )
247 const char*
s = (
const char*)
value;
253 for (
i = 0;
i < 7;
i++ )
256 if ( *ep !=
',' ||
s == ep )
257 return FT_THROW( Invalid_Argument );
263 if ( !( *ep ==
'\0' || *ep ==
' ' ) ||
s == ep )
264 return FT_THROW( Invalid_Argument );
272 x1 = darken_params[0];
273 y1 = darken_params[1];
274 x2 = darken_params[2];
275 y2 = darken_params[3];
276 x3 = darken_params[4];
277 y3 = darken_params[5];
278 x4 = darken_params[6];
279 y4 = darken_params[7];
281 if (
x1 < 0 ||
x2 < 0 || x3 < 0 || x4 < 0 ||
282 y1 < 0 ||
y2 < 0 || y3 < 0 || y4 < 0 ||
283 x1 >
x2 ||
x2 > x3 || x3 > x4 ||
284 y1 > 500 ||
y2 > 500 || y3 > 500 || y4 > 500 )
285 return FT_THROW( Invalid_Argument );
291 module->darken_params[4] = x3;
292 module->darken_params[5] = y3;
293 module->darken_params[6] = x4;
294 module->darken_params[7] = y4;
298 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
300#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
301 if ( value_is_string )
303 const char*
s = (
const char*)
value;
318 module->no_stem_darkening = *no_stem_darkening;
324 FT_TRACE0((
"af_property_set: missing property `%s'\n",
326 return FT_THROW( Missing_Property );
332 const char* property_name,
339#ifdef AF_CONFIG_OPTION_USE_WARPER
344 if ( !
ft_strcmp( property_name,
"glyph-to-script-map" ) )
356 else if ( !
ft_strcmp( property_name,
"fallback-script" ) )
367 else if ( !
ft_strcmp( property_name,
"default-script" ) )
372 *
val = default_script;
376 else if ( !
ft_strcmp( property_name,
"increase-x-height" ) )
388#ifdef AF_CONFIG_OPTION_USE_WARPER
389 else if ( !
ft_strcmp( property_name,
"warping" ) )
399 else if ( !
ft_strcmp( property_name,
"darkening-parameters" ) )
405 val[0] = darken_params[0];
406 val[1] = darken_params[1];
407 val[2] = darken_params[2];
408 val[3] = darken_params[3];
409 val[4] = darken_params[4];
410 val[5] = darken_params[5];
411 val[6] = darken_params[6];
412 val[7] = darken_params[7];
416 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
422 *
val = no_stem_darkening;
427 FT_TRACE0((
"af_property_get: missing property `%s'\n",
429 return FT_THROW( Missing_Property );
434 af_service_properties,
451#ifdef FT_CONFIG_OPTION_PIC
476#ifdef AF_CONFIG_OPTION_USE_WARPER
499#ifdef FT_DEBUG_AUTOFIT
500 if ( _af_debug_hints_rec->
memory )
511 FT_Int32 load_flags )
516#ifdef FT_DEBUG_AUTOFIT
533 glyph_index, load_flags );
535#ifdef FT_DEBUG_LEVEL_TRACE
539 af_glyph_hints_dump_points(
hints, 0 );
540 af_glyph_hints_dump_segments(
hints, 0 );
541 af_glyph_hints_dump_edges(
hints, 0 );
542#ifdef FT_DEBUG_LEVEL_TRACE
555 if (!
hints || !loader)
557 error = FT_Err_Out_Of_Memory;
572 glyph_index, load_flags );
590 af_autofitter_interface,
599 autofit_module_class,
af_face_globals_new(FT_Face face, AF_FaceGlobals *aglobals, AF_Module module)
af_face_globals_free(AF_FaceGlobals globals)
#define AF_STYLE_FALLBACK
#define AF_SCRIPT_DEFAULT
af_glyph_hints_done(AF_GlyphHints hints)
af_glyph_hints_init(AF_GlyphHints hints, FT_Memory memory)
af_loader_init(AF_Loader loader, AF_GlyphHints hints)
af_loader_load_glyph(AF_Loader loader, AF_Module module, FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
af_loader_done(AF_Loader loader)
FT_BEGIN_HEADER struct AF_LoaderRec_ AF_LoaderRec
const void FT_Module_Constructor FT_Module_Destructor af_autofitter_done
af_autofitter_load_glyph(AF_Module module, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
const void *& AF_INTERFACE_GET
static FT_Error af_property_get(FT_Module ft_module, const char *property_name, void *value)
const void FT_Module_Constructor af_autofitter_init
static FT_Error af_property_set(FT_Module ft_module, const char *property_name, const void *value, FT_Bool value_is_string)
static FT_Error af_property_get_face_globals(FT_Face face, AF_FaceGlobals *aglobals, AF_Module module)
&AF_SERVICE_PROPERTIES_GET af_get_interface(FT_Module module, const char *module_interface)
FT_BEGIN_HEADER struct AF_ModuleRec_ * AF_Module
FT_BEGIN_HEADER struct AF_ModuleRec_ AF_ModuleRec
#define AF_SERVICE_PROPERTIES_GET
#define AF_STYLE_CLASSES_GET
struct AF_FaceGlobalsRec_ * AF_FaceGlobals
#define FT_DEFINE_AUTOHINTER_INTERFACE( class_, reset_face_, get_global_hints_, done_global_hints_, load_glyph_)
FT_Error(* FT_AutoHinter_GlyphLoadFunc)(FT_AutoHinter hinter, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3
#define FT_CALLBACK_DEF(x)
#define FT_TRACE0(varformat)
void(* FT_Module_Destructor)(FT_Module module)
FT_Error(* FT_Module_Constructor)(FT_Module module)
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
#define FT_DEFINE_MODULE( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
void(* FT_Generic_Finalizer)(void *object)
GLenum GLuint GLint GLenum face
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static char memory[1024 *256]
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
namespace GUID const ADDRINFOEXW * hints
FT_UInt increase_x_height
#define FT_DEFINE_SERVICE_PROPERTIESREC(class_, set_property_, get_property_)
FT_Error(* FT_Properties_GetFunc)(FT_Module module, const char *property_name, void *value)
FT_Error(* FT_Properties_SetFunc)(FT_Module module, const char *property_name, const void *value, FT_Bool value_is_string)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2