shithub: freetype+ttf2subf

Download patch

ref: 3bf60950f7c44319150c1173667d6d4b79fbf18d
parent: bd41386280bd96fefa7271fd979190fd61584855
author: Werner Lemberg <[email protected]>
date: Sat Dec 21 03:49:11 EST 2013

[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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-12-21  Werner Lemberg  <[email protected]>
 
+	[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  <[email protected]>
+
 	Fix PIC linking.
 
 	* include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
--- 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 )                             \
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -49,19 +49,19 @@
     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;