Commit 44c6117ea7a7d31baf4def2a3d3044f407c6be5f

Sascha Brawer 2017-05-08T20:31:52

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

diff --git a/ChangeLog b/ChangeLog
index 152e8cf..79176c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
 2017-05-08  Sascha Brawer  <sascha@google.com>
 	    Werner Lemberg  <wl@gnu.org
 
+	[autofit] Add support for Shavian script.
+
+	* src/autofit/afblue.dat: Add blue zone data for Shavian.
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/afscript.h: Add Shavian standard character.
+
+	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data.
+
+2017-05-08  Sascha Brawer  <sascha@google.com>
+	    Werner Lemberg  <wl@gnu.org
+
 	[autofit] Add support for Vai script.
 
 	* src/autofit/afblue.dat: Add blue zone data for Vai.
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index d015c1e..d51d4fb 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -304,6 +304,16 @@
     '\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',
+    '\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',  /* ๐‘” ๐‘– ๐‘— ๐‘น ๐‘ป */
+    '\0',
+    '\xF0', '\x90', '\x91', '\x9F', ' ', '\xF0', '\x90', '\x91', '\xA3',  /* ๐‘Ÿ ๐‘ฃ */
+    '\0',
+    '\xF0', '\x90', '\x91', '\xB1', ' ', '\xF0', '\x90', '\x91', '\xB2', ' ', '\xF0', '\x90', '\x91', '\xB3', ' ', '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xB8', ' ', '\xF0', '\x90', '\x91', '\xBA', ' ', '\xF0', '\x90', '\x91', '\xBC',  /* ๐‘ฑ ๐‘ฒ ๐‘ณ ๐‘ด ๐‘ธ ๐‘บ ๐‘ผ */
+    '\0',
+    '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xBB', ' ', '\xF0', '\x90', '\x91', '\xB9',  /* ๐‘ด ๐‘ป ๐‘น */
+    '\0',
     '\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86',  /* เถ‰ เถš เถ เถณ เถด เถบ เถฝ เท† */
     '\0',
     '\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB',  /* เถ‘ เถ” เถ เถข เถง เถฎ เถฐ เถป */
@@ -612,6 +622,13 @@
     { AF_BLUE_STRING_OSMANYA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_OSMANYA_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                                 },
+    { AF_BLUE_STRING_SHAVIAN_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_MAX,                  0                                 },
     { AF_BLUE_STRING_SINHALA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_SINHALA_BOTTOM,    0                          },
     { AF_BLUE_STRING_SINHALA_DESCENDER, 0                          },
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
index 765b580..4978179 100644
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -401,6 +401,17 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_OSMANYA_BOTTOM
     "๐’€ ๐’‚ ๐’† ๐’ˆ ๐’Š ๐’’ ๐’  ๐’ฉ"
 
+  AF_BLUE_STRING_SHAVIAN_TOP
+    "๐‘• ๐‘™"
+  AF_BLUE_STRING_SHAVIAN_BOTTOM
+    "๐‘” ๐‘– ๐‘— ๐‘น ๐‘ป"
+  AF_BLUE_STRING_SHAVIAN_DESCENDER
+    "๐‘Ÿ ๐‘ฃ"
+  AF_BLUE_STRING_SHAVIAN_SMALL_TOP
+    "๐‘ฑ ๐‘ฒ ๐‘ณ ๐‘ด ๐‘ธ ๐‘บ ๐‘ผ"
+  AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM
+    "๐‘ด ๐‘ป ๐‘น"
+
   AF_BLUE_STRING_SINHALA_TOP
     "เถ‰ เถš เถ เถณ เถด เถบ เถฝ เท†"
   AF_BLUE_STRING_SINHALA_BOTTOM
@@ -910,6 +921,15 @@ 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_SHAW
+    { AF_BLUE_STRING_SHAVIAN_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_SHAVIAN_BOTTOM,       0                                 }
+    { AF_BLUE_STRING_SHAVIAN_DESCENDER,    0                                 }
+    { AF_BLUE_STRING_SHAVIAN_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_MAX,                  0                                 }
+
   AF_BLUE_STRINGSET_SINH
     { AF_BLUE_STRING_SINHALA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_SINHALA_BOTTOM,    0                          }
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index a43310f..9e83c96 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -216,29 +216,34 @@ FT_BEGIN_HEADER
     AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3655,
     AF_BLUE_STRING_OSMANYA_TOP = 3670,
     AF_BLUE_STRING_OSMANYA_BOTTOM = 3710,
-    AF_BLUE_STRING_SINHALA_TOP = 3750,
-    AF_BLUE_STRING_SINHALA_BOTTOM = 3782,
-    AF_BLUE_STRING_SINHALA_DESCENDER = 3814,
-    AF_BLUE_STRING_SUNDANESE_TOP = 3858,
-    AF_BLUE_STRING_SUNDANESE_BOTTOM = 3882,
-    AF_BLUE_STRING_SUNDANESE_DESCENDER = 3914,
-    AF_BLUE_STRING_TAI_VIET_TOP = 3922,
-    AF_BLUE_STRING_TAI_VIET_BOTTOM = 3942,
-    AF_BLUE_STRING_TAMIL_TOP = 3954,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 3986,
-    AF_BLUE_STRING_TELUGU_TOP = 4018,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 4046,
-    AF_BLUE_STRING_THAI_TOP = 4074,
-    AF_BLUE_STRING_THAI_BOTTOM = 4098,
-    AF_BLUE_STRING_THAI_ASCENDER = 4126,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4138,
-    AF_BLUE_STRING_THAI_DESCENDER = 4150,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4166,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 4174,
-    AF_BLUE_STRING_TIFINAGH = 4186,
-    AF_BLUE_STRING_VAI_TOP = 4218,
-    AF_BLUE_STRING_VAI_BOTTOM = 4250,
-    af_blue_1_1 = 4281,
+    AF_BLUE_STRING_SHAVIAN_TOP = 3750,
+    AF_BLUE_STRING_SHAVIAN_BOTTOM = 3760,
+    AF_BLUE_STRING_SHAVIAN_DESCENDER = 3785,
+    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 3795,
+    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 3830,
+    AF_BLUE_STRING_SINHALA_TOP = 3845,
+    AF_BLUE_STRING_SINHALA_BOTTOM = 3877,
+    AF_BLUE_STRING_SINHALA_DESCENDER = 3909,
+    AF_BLUE_STRING_SUNDANESE_TOP = 3953,
+    AF_BLUE_STRING_SUNDANESE_BOTTOM = 3977,
+    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4009,
+    AF_BLUE_STRING_TAI_VIET_TOP = 4017,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4037,
+    AF_BLUE_STRING_TAMIL_TOP = 4049,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 4081,
+    AF_BLUE_STRING_TELUGU_TOP = 4113,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 4141,
+    AF_BLUE_STRING_THAI_TOP = 4169,
+    AF_BLUE_STRING_THAI_BOTTOM = 4193,
+    AF_BLUE_STRING_THAI_ASCENDER = 4221,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4233,
+    AF_BLUE_STRING_THAI_DESCENDER = 4245,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4261,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 4269,
+    AF_BLUE_STRING_TIFINAGH = 4281,
+    AF_BLUE_STRING_VAI_TOP = 4313,
+    AF_BLUE_STRING_VAI_BOTTOM = 4345,
+    af_blue_1_1 = 4376,
 #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,
@@ -335,15 +340,16 @@ FT_BEGIN_HEADER
     AF_BLUE_STRINGSET_ORKH = 173,
     AF_BLUE_STRINGSET_OSGE = 176,
     AF_BLUE_STRINGSET_OSMA = 184,
-    AF_BLUE_STRINGSET_SINH = 187,
-    AF_BLUE_STRINGSET_SUND = 191,
-    AF_BLUE_STRINGSET_TAML = 195,
-    AF_BLUE_STRINGSET_TAVT = 198,
-    AF_BLUE_STRINGSET_TELU = 201,
-    AF_BLUE_STRINGSET_THAI = 204,
-    AF_BLUE_STRINGSET_TFNG = 212,
-    AF_BLUE_STRINGSET_VAII = 215,
-    af_blue_2_1 = 218,
+    AF_BLUE_STRINGSET_SHAW = 187,
+    AF_BLUE_STRINGSET_SINH = 193,
+    AF_BLUE_STRINGSET_SUND = 197,
+    AF_BLUE_STRINGSET_TAML = 201,
+    AF_BLUE_STRINGSET_TAVT = 204,
+    AF_BLUE_STRINGSET_TELU = 207,
+    AF_BLUE_STRINGSET_THAI = 210,
+    AF_BLUE_STRINGSET_TFNG = 218,
+    AF_BLUE_STRINGSET_VAII = 221,
+    af_blue_2_1 = 224,
 #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 c00494c..131ea93 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -702,6 +702,18 @@
   };
 
 
+  const AF_Script_UniRangeRec  af_shaw_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10450, 0x1047F ),   /* Shavian */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_shaw_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_sinh_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0D80,  0x0DFF ),  /* Sinhala */
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index 839b539..41c9f72 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -261,6 +261,12 @@
           HINTING_BOTTOM_TO_TOP,
           "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* ๐’† ๐’  */
 
+  SCRIPT( shaw, SHAW,
+          "Shavian",
+          HB_SCRIPT_SHAVIAN,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x91\xB4" ) /* ๐‘ด */
+
   SCRIPT( sinh, SINH,
           "Sinhala",
           HB_SCRIPT_SINHALA,
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
index 739e5ba..d92c361 100644
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -343,6 +343,13 @@
          AF_BLUE_STRINGSET_OSMA,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( shaw_dflt, SHAW_DFLT,
+         "Shavian default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_SHAW,
+         AF_BLUE_STRINGSET_SHAW,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( sinh_dflt, SINH_DFLT,
          "Sinhala default style",
          AF_WRITING_SYSTEM_LATIN,