24#ifdef FT_DEBUG_AUTOFIT
26#ifndef FT_MAKE_OPTION_SINGLE_OBJECT
46 int _af_debug_disable_horz_hints;
47 int _af_debug_disable_vert_hints;
48 int _af_debug_disable_blue_hints;
53 void* _af_debug_hints = _af_debug_hints_rec;
56#include FT_INTERNAL_OBJECTS_H
57#include FT_INTERNAL_DEBUG_H
59#include FT_SERVICE_PROPERTIES_H
69#define FT_COMPONENT afmodule
82 return FT_THROW( Invalid_Face_Handle );
94 face->autohint.finalizer =
108 const char* property_name,
115#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
120 if ( !
ft_strcmp( property_name,
"fallback-script" ) )
126#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
127 if ( value_is_string )
128 return FT_THROW( Invalid_Argument );
151 FT_TRACE0((
"af_property_set: Invalid value %d for property `%s'\n",
152 fallback_script, property_name ));
153 return FT_THROW( Invalid_Argument );
158 else if ( !
ft_strcmp( property_name,
"default-script" ) )
163#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
164 if ( value_is_string )
165 return FT_THROW( Invalid_Argument );
170 module->default_script = *default_script;
174 else if ( !
ft_strcmp( property_name,
"increase-x-height" ) )
180#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
181 if ( value_is_string )
182 return FT_THROW( Invalid_Argument );
193#ifdef AF_CONFIG_OPTION_USE_WARPER
194 else if ( !
ft_strcmp( property_name,
"warping" ) )
196#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
197 if ( value_is_string )
199 const char*
s = (
const char*)
value;
208 return FT_THROW( Invalid_Argument );
216 module->warping = *warping;
222 else if ( !
ft_strcmp( property_name,
"darkening-parameters" ) )
227#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
231 if ( value_is_string )
233 const char*
s = (
const char*)
value;
239 for (
i = 0;
i < 7;
i++ )
242 if ( *ep !=
',' ||
s == ep )
243 return FT_THROW( Invalid_Argument );
249 if ( !( *ep ==
'\0' || *ep ==
' ' ) ||
s == ep )
250 return FT_THROW( Invalid_Argument );
258 x1 = darken_params[0];
259 y1 = darken_params[1];
260 x2 = darken_params[2];
261 y2 = darken_params[3];
262 x3 = darken_params[4];
263 y3 = darken_params[5];
264 x4 = darken_params[6];
265 y4 = darken_params[7];
267 if (
x1 < 0 ||
x2 < 0 || x3 < 0 || x4 < 0 ||
268 y1 < 0 ||
y2 < 0 || y3 < 0 || y4 < 0 ||
269 x1 >
x2 ||
x2 > x3 || x3 > x4 ||
270 y1 > 500 ||
y2 > 500 || y3 > 500 || y4 > 500 )
271 return FT_THROW( Invalid_Argument );
277 module->darken_params[4] = x3;
278 module->darken_params[5] = y3;
279 module->darken_params[6] = x4;
280 module->darken_params[7] = y4;
284 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
286#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
287 if ( value_is_string )
289 const char*
s = (
const char*)
value;
304 module->no_stem_darkening = *no_stem_darkening;
310 FT_TRACE0((
"af_property_set: missing property `%s'\n",
312 return FT_THROW( Missing_Property );
318 const char* property_name,
325#ifdef AF_CONFIG_OPTION_USE_WARPER
330 if ( !
ft_strcmp( property_name,
"glyph-to-script-map" ) )
342 else if ( !
ft_strcmp( property_name,
"fallback-script" ) )
353 else if ( !
ft_strcmp( property_name,
"default-script" ) )
358 *
val = default_script;
362 else if ( !
ft_strcmp( property_name,
"increase-x-height" ) )
374#ifdef AF_CONFIG_OPTION_USE_WARPER
375 else if ( !
ft_strcmp( property_name,
"warping" ) )
385 else if ( !
ft_strcmp( property_name,
"darkening-parameters" ) )
391 val[0] = darken_params[0];
392 val[1] = darken_params[1];
393 val[2] = darken_params[2];
394 val[3] = darken_params[3];
395 val[4] = darken_params[4];
396 val[5] = darken_params[5];
397 val[6] = darken_params[6];
398 val[7] = darken_params[7];
402 else if ( !
ft_strcmp( property_name,
"no-stem-darkening" ) )
408 *
val = no_stem_darkening;
413 FT_TRACE0((
"af_property_get: missing property `%s'\n",
415 return FT_THROW( Missing_Property );
420 af_service_properties,
450#ifdef AF_CONFIG_OPTION_USE_WARPER
473#ifdef FT_DEBUG_AUTOFIT
474 if ( _af_debug_hints_rec->
memory )
485 FT_Int32 load_flags )
490#ifdef FT_DEBUG_AUTOFIT
498 return FT_Err_Out_Of_Memory;
513 glyph_index, load_flags );
515#ifdef FT_DEBUG_LEVEL_TRACE
519 af_glyph_hints_dump_points(
hints, 0 );
520 af_glyph_hints_dump_segments(
hints, 0 );
521 af_glyph_hints_dump_edges(
hints, 0 );
522#ifdef FT_DEBUG_LEVEL_TRACE
538 if (!
hints || !loader)
542 error = FT_Err_Out_Of_Memory;
557 glyph_index, load_flags );
583 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)
static FT_Error af_property_get(FT_Module ft_module, const char *property_name, void *value)
&af_service_properties af_get_interface(FT_Module module, const char *module_interface)
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)
const void *& af_autofitter_interface
FT_BEGIN_HEADER struct AF_ModuleRec_ * AF_Module
FT_BEGIN_HEADER struct AF_ModuleRec_ AF_ModuleRec
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 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_)
#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
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