Commit 6967eb93f82779239887e277c6b79986fed0ed2d

Sascha Brawer 2017-04-06T11:35:07

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

diff --git a/ChangeLog b/ChangeLog
index c8788e4..fc6710f 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 Tai Viet script.
+
+	* src/autofit/afblue.dat: Add blue zone data for Tai Viet.
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/afscript.h: Add Tai Viet standard characters.
+
+	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
+
+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.
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index 4be3c5f..a37a4e8 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -230,6 +230,10 @@
     '\0',
     '\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94',  /* ද ඳ උ ල තූ තු බු දු */
     '\0',
+    '\xEA', '\xAA', '\x86', ' ', '\xEA', '\xAA', '\x94', ' ', '\xEA', '\xAA', '\x92', ' ', '\xEA', '\xAA', '\x96', ' ', '\xEA', '\xAA', '\xAB',  /* ꪆ ꪔ ꪒ ꪖ ꪫ */
+    '\0',
+    '\xEA', '\xAA', '\x89', ' ', '\xEA', '\xAA', '\xAB', ' ', '\xEA', '\xAA', '\xAE',  /* ꪉ ꪫ ꪮ */
+    '\0',
     '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A',  /* உ ஒ ஓ ற ஈ க ங ச */
     '\0',
     '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA',  /* க ச ல ஶ உ ங ட ப */
@@ -467,6 +471,9 @@
     { AF_BLUE_STRING_TAMIL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_TAMIL_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,          0                          },
+    { AF_BLUE_STRING_TAI_VIET_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,             0                          },
     { AF_BLUE_STRING_TELUGU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_TELUGU_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,           0                          },
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
index d1e69b3..89e0b06 100644
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -316,6 +316,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_SINHALA_DESCENDER
     "ද ඳ උ ල තූ තු බු දු"
 
+  AF_BLUE_STRING_TAI_VIET_TOP
+    "ꪆ ꪔ ꪒ ꪖ ꪫ"
+  AF_BLUE_STRING_TAI_VIET_BOTTOM
+    "ꪉ ꪫ ꪮ"
+
   AF_BLUE_STRING_TAMIL_TOP
     "உ ஒ ஓ ற ஈ க ங ச"
   AF_BLUE_STRING_TAMIL_BOTTOM
@@ -730,6 +735,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_TAMIL_BOTTOM, 0                          }
     { AF_BLUE_STRING_MAX,          0                          }
 
+  AF_BLUE_STRINGSET_TAVT
+    { AF_BLUE_STRING_TAI_VIET_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,             0                          }
+
   AF_BLUE_STRINGSET_TELU
     { AF_BLUE_STRING_TELUGU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_TELUGU_BOTTOM, 0                          }
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index 0d25768..9c9654c 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -179,19 +179,21 @@ FT_BEGIN_HEADER
     AF_BLUE_STRING_SINHALA_TOP = 2567,
     AF_BLUE_STRING_SINHALA_BOTTOM = 2599,
     AF_BLUE_STRING_SINHALA_DESCENDER = 2631,
-    AF_BLUE_STRING_TAMIL_TOP = 2675,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 2707,
-    AF_BLUE_STRING_TELUGU_TOP = 2739,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 2767,
-    AF_BLUE_STRING_THAI_TOP = 2795,
-    AF_BLUE_STRING_THAI_BOTTOM = 2819,
-    AF_BLUE_STRING_THAI_ASCENDER = 2847,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2859,
-    AF_BLUE_STRING_THAI_DESCENDER = 2871,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2887,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 2895,
-    AF_BLUE_STRING_TIFINAGH = 2907,
-    af_blue_1_1 = 2938,
+    AF_BLUE_STRING_TAI_VIET_TOP = 2675,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 2695,
+    AF_BLUE_STRING_TAMIL_TOP = 2707,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 2739,
+    AF_BLUE_STRING_TELUGU_TOP = 2771,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 2799,
+    AF_BLUE_STRING_THAI_TOP = 2827,
+    AF_BLUE_STRING_THAI_BOTTOM = 2851,
+    AF_BLUE_STRING_THAI_ASCENDER = 2879,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2891,
+    AF_BLUE_STRING_THAI_DESCENDER = 2903,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2919,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 2927,
+    AF_BLUE_STRING_TIFINAGH = 2939,
+    af_blue_1_1 = 2970,
 #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,
@@ -278,10 +280,11 @@ FT_BEGIN_HEADER
     AF_BLUE_STRINGSET_OLCK = 131,
     AF_BLUE_STRINGSET_SINH = 134,
     AF_BLUE_STRINGSET_TAML = 138,
-    AF_BLUE_STRINGSET_TELU = 141,
-    AF_BLUE_STRINGSET_THAI = 144,
-    AF_BLUE_STRINGSET_TFNG = 152,
-    af_blue_2_1 = 155,
+    AF_BLUE_STRINGSET_TAVT = 141,
+    AF_BLUE_STRINGSET_TELU = 144,
+    AF_BLUE_STRINGSET_THAI = 147,
+    AF_BLUE_STRINGSET_TFNG = 155,
+    af_blue_2_1 = 158,
 #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 2c1e6af..451bac0 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -582,6 +582,23 @@
   };
 
 
+  const AF_Script_UniRangeRec  af_tavt_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xAA80,  0xAADF ),   /* Tai Viet */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_tavt_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xAAB0,  0xAAB0 ),
+    AF_UNIRANGE_REC(  0xAAB2,  0xAAB4 ),
+    AF_UNIRANGE_REC(  0xAAB7,  0xAAB8 ),
+    AF_UNIRANGE_REC(  0xAABE,  0xAABF ),
+    AF_UNIRANGE_REC(  0xAAC1,  0xAAC1 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_telu_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0C00,  0x0C7F ),  /* Telugu */
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index b14fb80..b74e56b 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -202,6 +202,12 @@
           HINTING_BOTTOM_TO_TOP,
           "\xE0\xAF\xA6" ) /* ௦ */
 
+  SCRIPT( tavt, TAVT,
+          "Tai Viet",
+          HB_SCRIPT_TAI_VIET,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\xAA\x92 \xEA\xAA\xAB" ) /* ꪒ ꪫ */
+
   /* there are no simple forms for letters; we thus use two digit shapes */
   SCRIPT( telu, TELU,
           "Telugu",
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
index cfbb32a..973508f 100644
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -273,6 +273,13 @@
          AF_BLUE_STRINGSET_TAML,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( tavt_dflt, TAVT_DFLT,
+         "Tai Viet default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_TAVT,
+         AF_BLUE_STRINGSET_TAVT,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( telu_dflt, TELU_DFLT,
          "Telugu default style",
          AF_WRITING_SYSTEM_LATIN,