Commit 4aa1aec1a3a867d45a128f9b1faa3b814619d41e

Sascha Brawer 2017-05-10T09:36:13

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

diff --git a/ChangeLog b/ChangeLog
index e2cb901..1352ca0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
 2017-05-10  Sascha Brawer  <sascha@google.com>
 	    Werner Lemberg  <wl@gnu.org
 
+	[autofit] Add support for Saurashtra script.
+
+	* src/autofit/afblue.dat: Add blue zone data for Saurashtra.
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/afscript.h: Add Saurashtra standard character.
+
+	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra
+	data.
+
+2017-05-10  Sascha Brawer  <sascha@google.com>
+	    Werner Lemberg  <wl@gnu.org
+
 	[autofit] Add support for Buhid script.
 
 	* src/autofit/afblue.dat: Add blue zone data for Buhid.
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index 66a9f48..5657299 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -312,6 +312,10 @@
     '\0',
     '\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9',  /* ๐’€ ๐’‚ ๐’† ๐’ˆ ๐’Š ๐’’ ๐’  ๐’ฉ */
     '\0',
+    '\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B',  /* ๊ขœ ๊ขž ๊ขณ ๊ข‚ ๊ข– ๊ข’ ๊ข ๊ข› */
+    '\0',
+    '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E',  /* ๊ข‚ ๊ขจ ๊ขบ ๊ขค ๊ขŽ */
+    '\0',
     '\xF0', '\x90', '\x91', '\x95', ' ', '\xF0', '\x90', '\x91', '\x99',  /* ๐‘• ๐‘™ */
     '\0',
     '\xF0', '\x90', '\x91', '\x94', ' ', '\xF0', '\x90', '\x91', '\x96', ' ', '\xF0', '\x90', '\x91', '\x97', ' ', '\xF0', '\x90', '\x91', '\xB9', ' ', '\xF0', '\x90', '\x91', '\xBB',  /* ๐‘” ๐‘– ๐‘— ๐‘น ๐‘ป */
@@ -636,6 +640,9 @@
     { AF_BLUE_STRING_OSMANYA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_OSMANYA_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,            0                          },
+    { AF_BLUE_STRING_SAURASHTRA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,               0                          },
     { AF_BLUE_STRING_SHAVIAN_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_SHAVIAN_BOTTOM,       0                                 },
     { AF_BLUE_STRING_SHAVIAN_DESCENDER,    0                                 },
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
index f1674a5..dbb28b9 100644
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -410,6 +410,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_OSMANYA_BOTTOM
     "๐’€ ๐’‚ ๐’† ๐’ˆ ๐’Š ๐’’ ๐’  ๐’ฉ"
 
+  AF_BLUE_STRING_SAURASHTRA_TOP
+    "๊ขœ ๊ขž ๊ขณ ๊ข‚ ๊ข– ๊ข’ ๊ข ๊ข›"
+  AF_BLUE_STRING_SAURASHTRA_BOTTOM
+    "๊ข‚ ๊ขจ ๊ขบ ๊ขค ๊ขŽ"
+
   AF_BLUE_STRING_SHAVIAN_TOP
     "๐‘• ๐‘™"
   AF_BLUE_STRING_SHAVIAN_BOTTOM
@@ -938,6 +943,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_OSMANYA_BOTTOM, 0                          }
     { AF_BLUE_STRING_MAX,            0                          }
 
+  AF_BLUE_STRINGSET_SAUR
+    { AF_BLUE_STRING_SAURASHTRA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,               0                          }
+
   AF_BLUE_STRINGSET_SHAW
     { AF_BLUE_STRING_SHAVIAN_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_SHAVIAN_BOTTOM,       0                                 }
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index f8d550e..18d8f12 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -220,34 +220,36 @@ FT_BEGIN_HEADER
     AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3719,
     AF_BLUE_STRING_OSMANYA_TOP = 3734,
     AF_BLUE_STRING_OSMANYA_BOTTOM = 3774,
-    AF_BLUE_STRING_SHAVIAN_TOP = 3814,
-    AF_BLUE_STRING_SHAVIAN_BOTTOM = 3824,
-    AF_BLUE_STRING_SHAVIAN_DESCENDER = 3849,
-    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 3859,
-    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 3894,
-    AF_BLUE_STRING_SINHALA_TOP = 3909,
-    AF_BLUE_STRING_SINHALA_BOTTOM = 3941,
-    AF_BLUE_STRING_SINHALA_DESCENDER = 3973,
-    AF_BLUE_STRING_SUNDANESE_TOP = 4017,
-    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4041,
-    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4073,
-    AF_BLUE_STRING_TAI_VIET_TOP = 4081,
-    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4101,
-    AF_BLUE_STRING_TAMIL_TOP = 4113,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 4145,
-    AF_BLUE_STRING_TELUGU_TOP = 4177,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 4205,
-    AF_BLUE_STRING_THAI_TOP = 4233,
-    AF_BLUE_STRING_THAI_BOTTOM = 4257,
-    AF_BLUE_STRING_THAI_ASCENDER = 4285,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4297,
-    AF_BLUE_STRING_THAI_DESCENDER = 4309,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4325,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 4333,
-    AF_BLUE_STRING_TIFINAGH = 4345,
-    AF_BLUE_STRING_VAI_TOP = 4377,
-    AF_BLUE_STRING_VAI_BOTTOM = 4409,
-    af_blue_1_1 = 4440,
+    AF_BLUE_STRING_SAURASHTRA_TOP = 3814,
+    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 3846,
+    AF_BLUE_STRING_SHAVIAN_TOP = 3866,
+    AF_BLUE_STRING_SHAVIAN_BOTTOM = 3876,
+    AF_BLUE_STRING_SHAVIAN_DESCENDER = 3901,
+    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 3911,
+    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 3946,
+    AF_BLUE_STRING_SINHALA_TOP = 3961,
+    AF_BLUE_STRING_SINHALA_BOTTOM = 3993,
+    AF_BLUE_STRING_SINHALA_DESCENDER = 4025,
+    AF_BLUE_STRING_SUNDANESE_TOP = 4069,
+    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4093,
+    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4125,
+    AF_BLUE_STRING_TAI_VIET_TOP = 4133,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4153,
+    AF_BLUE_STRING_TAMIL_TOP = 4165,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 4197,
+    AF_BLUE_STRING_TELUGU_TOP = 4229,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 4257,
+    AF_BLUE_STRING_THAI_TOP = 4285,
+    AF_BLUE_STRING_THAI_BOTTOM = 4309,
+    AF_BLUE_STRING_THAI_ASCENDER = 4337,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4349,
+    AF_BLUE_STRING_THAI_DESCENDER = 4361,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4377,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 4385,
+    AF_BLUE_STRING_TIFINAGH = 4397,
+    AF_BLUE_STRING_VAI_TOP = 4429,
+    AF_BLUE_STRING_VAI_BOTTOM = 4461,
+    af_blue_1_1 = 4492,
 #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,
@@ -345,16 +347,17 @@ FT_BEGIN_HEADER
     AF_BLUE_STRINGSET_ORKH = 178,
     AF_BLUE_STRINGSET_OSGE = 181,
     AF_BLUE_STRINGSET_OSMA = 189,
-    AF_BLUE_STRINGSET_SHAW = 192,
-    AF_BLUE_STRINGSET_SINH = 198,
-    AF_BLUE_STRINGSET_SUND = 202,
-    AF_BLUE_STRINGSET_TAML = 206,
-    AF_BLUE_STRINGSET_TAVT = 209,
-    AF_BLUE_STRINGSET_TELU = 212,
-    AF_BLUE_STRINGSET_THAI = 215,
-    AF_BLUE_STRINGSET_TFNG = 223,
-    AF_BLUE_STRINGSET_VAII = 226,
-    af_blue_2_1 = 229,
+    AF_BLUE_STRINGSET_SAUR = 192,
+    AF_BLUE_STRINGSET_SHAW = 195,
+    AF_BLUE_STRINGSET_SINH = 201,
+    AF_BLUE_STRINGSET_SUND = 205,
+    AF_BLUE_STRINGSET_TAML = 209,
+    AF_BLUE_STRINGSET_TAVT = 212,
+    AF_BLUE_STRINGSET_TELU = 215,
+    AF_BLUE_STRINGSET_THAI = 218,
+    AF_BLUE_STRINGSET_TFNG = 226,
+    AF_BLUE_STRINGSET_VAII = 229,
+    af_blue_2_1 = 232,
 #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 6adb985..6f9a6b0 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -715,6 +715,20 @@
   };
 
 
+  const AF_Script_UniRangeRec  af_saur_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA880,  0xA8DF ),   /* Saurashtra */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_saur_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA880,  0xA881 ),
+    AF_UNIRANGE_REC(  0xA8B4,  0xA8C5 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_shaw_uniranges[] =
   {
     AF_UNIRANGE_REC( 0x10450, 0x1047F ),   /* Shavian */
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index 398221c..b22a489 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -267,6 +267,12 @@
           HINTING_BOTTOM_TO_TOP,
           "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* ๐’† ๐’  */
 
+  SCRIPT( saur, SAUR,
+          "Saurashtra",
+          HB_SCRIPT_SAURASHTRA,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\xA2\x9D \xEA\xA3\x90" ) /* ๊ข ๊ฃ */
+
   SCRIPT( shaw, SHAW,
           "Shavian",
           HB_SCRIPT_SHAVIAN,
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
index fde4e18..e53a25a 100644
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -350,6 +350,13 @@
          AF_BLUE_STRINGSET_OSMA,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( saur_dflt, SAUR_DFLT,
+         "Saurashtra default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_SAUR,
+         AF_BLUE_STRINGSET_SAUR,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( shaw_dflt, SHAW_DFLT,
          "Shavian default style",
          AF_WRITING_SYSTEM_LATIN,