diff --git a/ChangeLog b/ChangeLog index f29d23cfe..7937534ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2013-12-21 Werner Lemberg + + [autofit] Make PIC mode work actually. + + * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the + enumeration values automatically generated by including `afscript.h' + and friends. + + * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. + 2013-12-21 Werner Lemberg Fix PIC linking. diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c index 1806895cd..eba6a8987 100644 --- a/src/autofit/afpic.c +++ b/src/autofit/afpic.c @@ -98,20 +98,20 @@ FT_Init_Class_af_service_properties( &container->af_service_properties ); - for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX - 1; ss++ ) + for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX; ss++ ) container->af_writing_system_classes[ss] = &container->af_writing_system_classes_rec[ss]; - container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX - 1] = NULL; + container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL; - for ( ss = 0; ss < AF_SCRIPT_MAX - 1; ss++ ) + for ( ss = 0; ss < AF_SCRIPT_MAX; ss++ ) container->af_script_classes[ss] = &container->af_script_classes_rec[ss]; - container->af_script_classes[AF_SCRIPT_MAX - 1] = NULL; + container->af_script_classes[AF_SCRIPT_MAX] = NULL; - for ( ss = 0; ss < AF_STYLE_MAX - 1; ss++ ) + for ( ss = 0; ss < AF_STYLE_MAX; ss++ ) container->af_style_classes[ss] = &container->af_style_classes_rec[ss]; - container->af_style_classes[AF_STYLE_MAX - 1] = NULL; + container->af_style_classes[AF_STYLE_MAX] = NULL; #undef WRITING_SYSTEM #define WRITING_SYSTEM( ws, WS ) \ diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h index 951628f2f..9a68b4a5a 100644 --- a/src/autofit/afpic.h +++ b/src/autofit/afpic.h @@ -49,19 +49,19 @@ FT_BEGIN_HEADER FT_Service_PropertiesRec af_service_properties; AF_WritingSystemClass af_writing_system_classes - [AF_WRITING_SYSTEM_MAX]; + [AF_WRITING_SYSTEM_MAX + 1]; AF_WritingSystemClassRec af_writing_system_classes_rec - [AF_WRITING_SYSTEM_MAX - 1]; + [AF_WRITING_SYSTEM_MAX]; AF_ScriptClass af_script_classes - [AF_SCRIPT_MAX]; + [AF_SCRIPT_MAX + 1]; AF_ScriptClassRec af_script_classes_rec - [AF_SCRIPT_MAX - 1]; + [AF_SCRIPT_MAX]; AF_StyleClass af_style_classes - [AF_STYLE_MAX]; + [AF_STYLE_MAX + 1]; AF_StyleClassRec af_style_classes_rec - [AF_STYLE_MAX - 1]; + [AF_STYLE_MAX]; FT_AutoHinter_InterfaceRec af_autofitter_interface;