Commit db3e5b9394d90365ca28d2d5e33ed69db2adbfe2

Werner Lemberg 2013-08-25T08:23:22

[autofit] Add blue stringsets. * src/autofit/aftypes.h: Include `afblue.h'. (AF_ScriptClassRec): Add `blue_stringset' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/autofit.c: Include `afblue.c'. * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class), src/autofit/aflatin.c (af_latn_script_class), src/autofit/aflatin2.c (af_ltn2_script_class): Updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.

diff --git a/ChangeLog b/ChangeLog
index 1c57e55..17eeff0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2013-08-25  Werner Lemberg  <wl@gnu.org>
 
+	[autofit] Add blue stringsets.
+
+	* src/autofit/aftypes.h: Include `afblue.h'.
+	(AF_ScriptClassRec): Add `blue_stringset' field.
+	(AF_DEFINE_SCRIPT_CLASS): Updated.
+
+	* src/autofit/autofit.c: Include `afblue.c'.
+
+	* src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
+	(af_dflt_script_class), src/autofit/afindic.c
+	(af_deva_script_class), src/autofit/aflatin.c
+	(af_latn_script_class), src/autofit/aflatin2.c
+	(af_ltn2_script_class): Updated.
+
+	* src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
+
+2013-08-25  Werner Lemberg  <wl@gnu.org>
+
 	[autofit] Introduce data file for blue strings.
 
 	The idea is to have a central file which gets processed by a Perl
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index cb53083..dfb8800 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -2281,6 +2281,7 @@
     af_hani_script_class,
 
     AF_SCRIPT_HANI,
+    AF_BLUE_STRINGSET_HANI,
     AF_WRITING_SYSTEM_CJK,
 
     af_hani_uniranges,
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index d559bfe..b28e1cf 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -63,6 +63,7 @@
     af_dflt_script_class,
 
     AF_SCRIPT_DFLT,
+    0,
     AF_WRITING_SYSTEM_DUMMY,
 
     NULL,
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 5dfe404..3ed04e4 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -158,6 +158,7 @@
     af_deva_script_class,
 
     AF_SCRIPT_DEVA,
+    0, /* XXX */
     AF_WRITING_SYSTEM_INDIC,
 
     af_deva_uniranges,
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index b7f1a09..eeef04d 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -2505,6 +2505,7 @@
     af_latn_script_class,
 
     AF_SCRIPT_LATN,
+    AF_BLUE_STRINGSET_LATN,
     AF_WRITING_SYSTEM_LATIN,
 
     af_latn_uniranges,
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index cea3fdb..0689aa3 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -2437,6 +2437,7 @@
     af_ltn2_script_class,
 
     AF_SCRIPT_LTN2,
+    AF_BLUE_STRINGSET_LATN,
     AF_WRITING_SYSTEM_LATIN2,
 
     af_ltn2_uniranges,
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index b47aa4e..2142319 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -39,6 +39,8 @@
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_DEBUG_H
 
+#include "afblue.h"
+
 
 FT_BEGIN_HEADER
 
@@ -351,8 +353,9 @@ extern void*  _af_debug_hints;
 
   typedef struct  AF_ScriptClassRec_
   {
-    AF_Script         script;
-    AF_WritingSystem  writing_system;
+    AF_Script          script;
+    AF_Blue_Stringset  blue_stringset;
+    AF_WritingSystem   writing_system;
 
     AF_Script_UniRange  script_uni_ranges; /* last must be { 0, 0 }        */
     FT_UInt32           standard_char;     /* for default width and height */
@@ -399,6 +402,7 @@ extern void*  _af_debug_hints;
 #define AF_DEFINE_SCRIPT_CLASS(           \
           script_class,                   \
           script_,                        \
+          blue_stringset_,                \
           writing_system_,                \
           ranges,                         \
           std_char )                      \
@@ -406,6 +410,7 @@ extern void*  _af_debug_hints;
   const AF_ScriptClassRec  script_class = \
   {                                       \
     script_,                              \
+    blue_stringset_,                      \
     writing_system_,                      \
     ranges,                               \
     std_char                              \
@@ -449,6 +454,7 @@ extern void*  _af_debug_hints;
 #define AF_DEFINE_SCRIPT_CLASS(                            \
           script_class,                                    \
           script_,                                         \
+          blue_string_set_,                                \
           writing_system_,                                 \
           ranges,                                          \
           std_char )                                       \
@@ -456,6 +462,7 @@ extern void*  _af_debug_hints;
   FT_Init_Class_ ## script_class( AF_ScriptClassRec*  ac ) \
   {                                                        \
     ac->script            = script_;                       \
+    ac->blue_stringset    = blue_stringset_;               \
     ac->writing_system    = writing_system_;               \
     ac->script_uni_ranges = ranges;                        \
     ac->standard_char     = std_char;                      \
diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c
index 3883a0a..b23374a 100644
--- a/src/autofit/autofit.c
+++ b/src/autofit/autofit.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter module (body).                                           */
 /*                                                                         */
-/*  Copyright 2003-2007, 2011 by                                           */
+/*  Copyright 2003-2007, 2011, 2013 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -20,6 +20,7 @@
 #include <ft2build.h>
 #include "afpic.c"
 #include "afangles.c"
+#include "afblue.c"
 #include "afglobal.c"
 #include "afhints.c"
 
diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk
index c8b733d..745adab 100644
--- a/src/autofit/rules.mk
+++ b/src/autofit/rules.mk
@@ -26,6 +26,7 @@ AUTOF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTOF_DIR))
 # AUTOF driver sources (i.e., C files)
 #
 AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \
+                 $(AUTOF_DIR)/afblue.c   \
                  $(AUTOF_DIR)/afcjk.c    \
                  $(AUTOF_DIR)/afdummy.c  \
                  $(AUTOF_DIR)/afglobal.c \