[arabic] Adjust feature order again
Fixes https://github.com/behdad/harfbuzz/issues/505
diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
index c6609c5..5dbbcd9 100644
--- a/src/hb-ot-shape-complex-arabic.cc
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -199,6 +199,9 @@
* work. However, testing shows that rlig and calt are applied
* together for Mongolian in Uniscribe. As such, we only add a
* pause for Arabic, not other scripts.
+ *
+ * A pause after calt is required to make KFGQPC Uthmanic Script HAFS
+ * work correctly. See https://github.com/behdad/harfbuzz/issues/505
*/
map->add_gsub_pause (nuke_joiners);
@@ -222,7 +225,10 @@
if (plan->props.script == HB_SCRIPT_ARABIC)
map->add_gsub_pause (arabic_fallback_shape);
+ /* No pause after rclt. See 98460779bae19e4d64d29461ff154b3527bf8420. */
+ map->add_global_bool_feature (HB_TAG('r','c','l','t'));
map->add_global_bool_feature (HB_TAG('c','a','l','t'));
+ map->add_gsub_pause (NULL);
/* The spec includes 'cswh'. Earlier versions of Windows
* used to enable this by default, but testing suggests
@@ -232,7 +238,6 @@
* Note that IranNastaliq uses this feature extensively
* to fixup broken glyph sequences. Oh well...
* Test case: U+0643,U+0640,U+0631. */
- //map->add_gsub_pause (NULL);
//map->add_global_bool_feature (HB_TAG('c','s','w','h'));
map->add_global_bool_feature (HB_TAG('m','s','e','t'));
}
diff --git a/test/shaping/fonts/sha1sum/bf39b0e91ef9807f15a9e283a21a14a209fd2cfc.ttf b/test/shaping/fonts/sha1sum/bf39b0e91ef9807f15a9e283a21a14a209fd2cfc.ttf
new file mode 100644
index 0000000..ce017a3
--- /dev/null
+++ b/test/shaping/fonts/sha1sum/bf39b0e91ef9807f15a9e283a21a14a209fd2cfc.ttf
Binary files differ
diff --git a/test/shaping/tests/arabic-feature-order.tests b/test/shaping/tests/arabic-feature-order.tests
index e60ab1a..58e741e 100644
--- a/test/shaping/tests/arabic-feature-order.tests
+++ b/test/shaping/tests/arabic-feature-order.tests
@@ -1,3 +1,4 @@
fonts/sha1sum/813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf::U+1820,U+180B:[uni2048.E81A=0+1550]
fonts/sha1sum/8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf::U+1820,U+180B:[uni2048.E81A=0+1550]
fonts/sha1sum/a919b33197965846f21074b24e30250d67277bce.ttf::U+0644,U+0644,U+0647:[Lellah=0+1503]
+fonts/sha1sum/bf39b0e91ef9807f15a9e283a21a14a209fd2cfc.ttf::U+0644,U+064E,U+0670,U+0653,U+0626:[afii57414.zz04=4+1202|uni0670_uni0653=0@50,350+0|afii57454=0@550,1425+0|afii57444.calt=0+1065]