Commit 837f1125668805f47d810aec5a2c02e88453b557

Sascha Brawer 2017-04-06T08:44:08

[autofit] Add support for Tifinagh script. * src/autofit/afblue.dat: Add blue zone data for Tifinagh. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tifinagh standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.

diff --git a/ChangeLog b/ChangeLog
index dc9fd9d..c8788e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
 2017-04-06  Sascha Brawer  <sascha@google.com>
 	    Werner Lemberg  <wl@gnu.org
 
+	[autofit] Add support for Tifinagh script.
+
+	* src/autofit/afblue.dat: Add blue zone data for Tifinagh.
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/afscript.h: Add Tifinagh standard characters.
+
+	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
+
+2017-04-06  Sascha Brawer  <sascha@google.com>
+	    Werner Lemberg  <wl@gnu.org
+
 	[autofit] Add support for N'Ko script.
 
 	* src/autofit/afblue.dat: Add blue zone data for N'Ko.
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index d49767a..4be3c5f 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -251,6 +251,8 @@
     '\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90',  /* ญ ฐ */
     '\0',
     '\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93',  /* ๐ ๑ ๓ */
+    '\0',
+    '\xE2', '\xB5', '\x94', ' ', '\xE2', '\xB5', '\x99', ' ', '\xE2', '\xB5', '\x9B', ' ', '\xE2', '\xB5', '\x9E', ' ', '\xE2', '\xB4', '\xB5', ' ', '\xE2', '\xB4', '\xBC', ' ', '\xE2', '\xB4', '\xB9', ' ', '\xE2', '\xB5', '\x8E',  /* ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ */
 #ifdef AF_CONFIG_OPTION_CJK
     '\0',
     '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0',  /* 他 们 你 來 們 到 和 地 */
@@ -477,6 +479,9 @@
     { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0                                 },
     { AF_BLUE_STRING_THAI_DIGIT_TOP,       0                                 },
     { AF_BLUE_STRING_MAX,                  0                                 },
+    { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_TIFINAGH, 0                          },
+    { AF_BLUE_STRING_MAX,      0                          },
 #ifdef AF_CONFIG_OPTION_CJK
     { AF_BLUE_STRING_CJK_TOP,    AF_BLUE_PROPERTY_CJK_TOP     },
     { AF_BLUE_STRING_CJK_BOTTOM, 0                            },
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
index 6d86809..d1e69b3 100644
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -341,6 +341,9 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_THAI_DIGIT_TOP
     "๐ ๑ ๓"
 
+  AF_BLUE_STRING_TIFINAGH
+    "ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ"
+
 
 #ifdef AF_CONFIG_OPTION_CJK
 
@@ -743,6 +746,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_THAI_DIGIT_TOP,       0                                 }
     { AF_BLUE_STRING_MAX,                  0                                 }
 
+  AF_BLUE_STRINGSET_TFNG
+    { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_TIFINAGH, 0                          }
+    { AF_BLUE_STRING_MAX,      0                          }
+
 
 #ifdef AF_CONFIG_OPTION_CJK
 
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index 9fd3498..0d25768 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -190,7 +190,8 @@ FT_BEGIN_HEADER
     AF_BLUE_STRING_THAI_DESCENDER = 2871,
     AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2887,
     AF_BLUE_STRING_THAI_DIGIT_TOP = 2895,
-    af_blue_1_1 = 2906,
+    AF_BLUE_STRING_TIFINAGH = 2907,
+    af_blue_1_1 = 2938,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
     AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -279,7 +280,8 @@ FT_BEGIN_HEADER
     AF_BLUE_STRINGSET_TAML = 138,
     AF_BLUE_STRINGSET_TELU = 141,
     AF_BLUE_STRINGSET_THAI = 144,
-    af_blue_2_1 = 152,
+    AF_BLUE_STRINGSET_TFNG = 152,
+    af_blue_2_1 = 155,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
     af_blue_2_1_1 = af_blue_2_1 + 2,
diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c
index 57236cf..2c1e6af 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -613,6 +613,18 @@
   };
 
 
+  const AF_Script_UniRangeRec  af_tfng_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x2D30,  0x2D7F ),   /* Tifinagh */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_tfng_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   const AF_Script_UniRangeRec  af_limb_uniranges[] =
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index e90ce82..b14fb80 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -215,6 +215,12 @@
           HINTING_BOTTOM_TO_TOP,
           "\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */
 
+  SCRIPT( tfng, TFNG,
+          "Tifinagh",
+          HB_SCRIPT_TIFINAGH,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE2\xB5\x94" ) /* ⵔ */
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   SCRIPT( limb, LIMB,
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
index beb0152..cfbb32a 100644
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -287,6 +287,13 @@
          AF_BLUE_STRINGSET_THAI,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( tfng_dflt, TFNG_DFLT,
+         "Tifinagh default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_TFNG,
+         AF_BLUE_STRINGSET_TFNG,
+         AF_COVERAGE_DEFAULT )
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   /* no blue stringset support for the Indic writing system yet */