[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Oct 3 11:49:57 UTC 2017


 src/hb-ot-layout-gpos-table.hh                                          |    4 +++-
 test/shaping/Makefile.am                                                |    1 +
 test/shaping/fonts/sha1sum/98b7887cff91f722b92a8ff800120954606354f9.ttf |binary
 test/shaping/tests/mark-attachment.tests                                |    1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 5d98de1f382254a8a21fd9a04b642268a21be16f
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Oct 3 13:46:25 2017 +0200

    Tweak mark-base attachment
    
    Apparently a base glyph can also become an attached component of a
    ligature if the ligature-forming lookup used IgnoreBase.  This was
    being confused with a non-first component of a MultipleSubst and
    hence not matched for mark-attachment.  Tweak test to fix.
    
    Fixes https://github.com/behdad/harfbuzz/issues/543

diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 738ca8c4..e45ce272 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1087,7 +1087,9 @@ struct MarkBasePosFormat1
     do {
       if (!skippy_iter.prev ()) return_trace (false);
       /* We only want to attach to the first of a MultipleSubst sequence.  Reject others. */
-      if (0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx])) break;
+      if (!_hb_glyph_info_multiplied (&buffer->info[skippy_iter.idx]) ||
+	  0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]))
+	break;
       skippy_iter.reject ();
     } while (1);
 
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index 6617e679..d56bcc4c 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -62,6 +62,7 @@ TESTS = \
 	tests/indic-syllable.tests \
 	tests/language-tags.tests \
 	tests/ligature-id.tests \
+	tests/mark-attachment.tests \
 	tests/mark-filtering-sets.tests \
 	tests/mongolian-variation-selector.tests \
 	tests/spaces.tests \
diff --git a/test/shaping/fonts/sha1sum/98b7887cff91f722b92a8ff800120954606354f9.ttf b/test/shaping/fonts/sha1sum/98b7887cff91f722b92a8ff800120954606354f9.ttf
new file mode 100644
index 00000000..4835c762
Binary files /dev/null and b/test/shaping/fonts/sha1sum/98b7887cff91f722b92a8ff800120954606354f9.ttf differ
diff --git a/test/shaping/tests/mark-attachment.tests b/test/shaping/tests/mark-attachment.tests
new file mode 100644
index 00000000..c3c2d278
--- /dev/null
+++ b/test/shaping/tests/mark-attachment.tests
@@ -0,0 +1 @@
+fonts/sha1sum/98b7887cff91f722b92a8ff800120954606354f9.ttf::U+100F,U+103C,U+102F,U+1036:[uni103C102F=0+150|uni100F=0+550|uni1036=0 at -150,0+0]


More information about the HarfBuzz mailing list