Commit 8f17809b2d1051a50f743b3e38a54add98eebc30

Werner Lemberg 2014-10-14T08:28:09

[autofit] Adjust Devenagari character range. * src/autofit/afranges.c (af_deva_uniranges): Omit characters that are common to all other Indic scripts.

diff --git a/ChangeLog b/ChangeLog
index 6ca3524..3c49129 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-14  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Adjust Devenagari character range.
+
+	* src/autofit/afranges.c (af_deva_uniranges): Omit characters that
+	are common to all other Indic scripts.
+
 2014-10-12  Werner Lemberg  <wl@gnu.org>
 
 	[sfnt] Fix Savannah bug #43392.
diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c
index 139a4c1..3844a73 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -28,9 +28,19 @@
     AF_UNIRANGE_REC(       0UL,       0UL )
   };
 
+  /* there are some characters in the Devanagari Unicode block that are    */
+  /* generic to Indic scripts; we omit them so that their presence doesn't */
+  /* trigger Devanagari                                                    */
+
   const AF_Script_UniRangeRec  af_deva_uniranges[] =
   {
-    AF_UNIRANGE_REC(  0x0900UL,  0x097FUL ),  /* Devanagari       */
+    AF_UNIRANGE_REC(  0x0900UL,  0x093BUL ),  /* Devanagari       */
+    /* omitting U+093C nukta */
+    AF_UNIRANGE_REC(  0x093DUL,  0x0950UL ),
+    /* omitting U+0951 udatta, U+0952 anudatta */
+    AF_UNIRANGE_REC(  0x0953UL,  0x0963UL ),
+    /* omitting U+0964 danda, U+0965 double danda */
+    AF_UNIRANGE_REC(  0x0966UL,  0x097FUL ),
     AF_UNIRANGE_REC(  0x20B9UL,  0x20B9UL ),  /* (new) Rupee sign */
     AF_UNIRANGE_REC(       0UL,       0UL )
   };