[indic] Fix shaping of U+0A51
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 2 Oct 2017 16:56:10 +0000 (18:56 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 2 Oct 2017 16:57:03 +0000 (18:57 +0200)
Mark it as matra below to allow the sequence U+0A15, U+0A51, U+0A47.
Oh well...

Fixes https://github.com/behdad/harfbuzz/issues/524

src/hb-ot-shape-complex-indic.cc
test/shaping/fonts/sha1sum/85fe0be440c64ac77699e21c2f1bd933a919167e.ttf [new file with mode: 0644]
test/shaping/tests/indic-syllable.tests

index c8640cc..d168160 100644 (file)
@@ -208,6 +208,12 @@ set_indic_properties (hb_glyph_info_t &info)
     cat = OT_M;
     pos = POS_ABOVE_C;
   }
+  else if (unlikely (u == 0x0A51u))
+  {
+    /* https://github.com/behdad/harfbuzz/issues/524 */
+    cat = OT_M;
+    pos = POS_BELOW_C;
+  }
 
   /* According to ScriptExtensions.txt, these Grantha marks may also be used in Tamil,
    * so the Indic shaper needs to know their categories. */
diff --git a/test/shaping/fonts/sha1sum/85fe0be440c64ac77699e21c2f1bd933a919167e.ttf b/test/shaping/fonts/sha1sum/85fe0be440c64ac77699e21c2f1bd933a919167e.ttf
new file mode 100644 (file)
index 0000000..6198614
Binary files /dev/null and b/test/shaping/fonts/sha1sum/85fe0be440c64ac77699e21c2f1bd933a919167e.ttf differ
index df3d7d8..5b0ae90 100644 (file)
@@ -2,3 +2,4 @@ fonts/sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf::U+0BA4,U+0BCD,U+00B3
 fonts/sha1sum/3d0b77a2360aa6faa1385aaa510509ab70dfbeff.ttf::U+0CF1:[gid1=0+1129]
 fonts/sha1sum/3d0b77a2360aa6faa1385aaa510509ab70dfbeff.ttf::U+0CF2:[gid2=0+1539]
 fonts/sha1sum/87f85d17d26f1fe9ad28d7365101958edaefb967.ttf::U+0980,U+0981:[anjibeng=0+520|candrabindubeng=0+0]
+fonts/sha1sum/85fe0be440c64ac77699e21c2f1bd933a919167e.ttf::U+0A15,U+0A51,U+0A47:[kaguru=0+1273|udaatguru=0@75,0+0|eematraguru=0@-40,0+0]