[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Nov 9 00:12:22 UTC 2017


 src/hb-ot-shape-complex-indic.cc                                        |   14 ++++++----
 test/shaping/Makefile.am                                                |    1 
 test/shaping/fonts/sha1sum/1a3d8f381387dd29be1e897e4b5100ac8b4829e1.ttf |binary
 test/shaping/tests/indic-init.tests                                     |    1 
 4 files changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 5a9cba9744876dfc56bdc9aed805f571bd0d4b0a
Author: David Corbett <corbett.dav at husky.neu.edu>
Date:   Wed Nov 8 13:15:27 2017 -0500

    Mark non-initial left matras as unsafe to break

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index f7df985d..8e2cd620 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1686,11 +1686,15 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
 
 
   /* Apply 'init' to the Left Matra if it's a word start. */
-  if (info[start].indic_position () == POS_PRE_M &&
-      (!start ||
-       !(FLAG_UNSAFE (_hb_glyph_info_get_general_category (&info[start - 1])) &
-	 FLAG_RANGE (HB_UNICODE_GENERAL_CATEGORY_FORMAT, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))))
-    info[start].mask |= indic_plan->mask_array[INIT];
+  if (info[start].indic_position () == POS_PRE_M)
+  {
+    if (!start ||
+	!(FLAG_UNSAFE (_hb_glyph_info_get_general_category (&info[start - 1])) &
+	 FLAG_RANGE (HB_UNICODE_GENERAL_CATEGORY_FORMAT, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
+      info[start].mask |= indic_plan->mask_array[INIT];
+    else
+      buffer->unsafe_to_break (start - 1, start + 1);
+  }
 
 
   /*
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index ca7c1c30..592754b2 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -58,6 +58,7 @@ TESTS = \
 	tests/hangul-jamo.tests \
 	tests/hyphens.tests \
 	tests/indic-consonant-with-stacker.tests \
+	tests/indic-init.tests \
 	tests/indic-joiner-candrabindu.tests \
 	tests/indic-joiners.tests \
 	tests/indic-old-spec.tests \
diff --git a/test/shaping/fonts/sha1sum/1a3d8f381387dd29be1e897e4b5100ac8b4829e1.ttf b/test/shaping/fonts/sha1sum/1a3d8f381387dd29be1e897e4b5100ac8b4829e1.ttf
new file mode 100644
index 00000000..d060ea96
Binary files /dev/null and b/test/shaping/fonts/sha1sum/1a3d8f381387dd29be1e897e4b5100ac8b4829e1.ttf differ
diff --git a/test/shaping/tests/indic-init.tests b/test/shaping/tests/indic-init.tests
new file mode 100644
index 00000000..1231eabc
--- /dev/null
+++ b/test/shaping/tests/indic-init.tests
@@ -0,0 +1 @@
+fonts/sha1sum/1a3d8f381387dd29be1e897e4b5100ac8b4829e1.ttf:--no-glyph-names:U+09AC,U+09C7,U+09AC,U+09C7:[3=0+273|1=0+460|2=2+307|1=2+460]


More information about the HarfBuzz mailing list