[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Sat Jun 30 11:33:04 UTC 2018


 src/hb-ot-layout-gpos-table.hh |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d3c0980ac234698627cb281e5526cc99139eed30
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Jun 30 15:59:25 2018 +0430

    Adjust MarkBasePos heuristic in presence of MultipleSubst
    
    From the issue:
    "In this font, the virama,ya first forms a ligature, then decomposes back to
    virama,ya. This causes those two to be marked parts of a MultipleSubst
    sequence. When attaching the matra, we look for the first of the MultipleSubst
    sequence because that's where we attach to (because of eg #740). In this case,
    the first glyph in the MultipleSubst sequence is a mark, so we skip it and
    attach to the base char before it."
    
    Font in question is Nirmala UI from Windows 10. Test sequence:
    
      U+0926,U+094D,U+092F,U+0941
    
    Fixes https://github.com/harfbuzz/harfbuzz/issues/1020

diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index bc8a5fd6..182c8d90 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1074,10 +1074,13 @@ struct MarkBasePosFormat1
       if (!skippy_iter.prev ()) return_trace (false);
       /* We only want to attach to the first of a MultipleSubst sequence.
        * https://github.com/harfbuzz/harfbuzz/issues/740
-       * Reject others. */
+       * Reject others...
+       * ...but stop if we find a mark in the MultipleSubst sequence:
+       * https://github.com/harfbuzz/harfbuzz/issues/1020 */
       if (!_hb_glyph_info_multiplied (&buffer->info[skippy_iter.idx]) ||
 	  0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) ||
 	  (skippy_iter.idx == 0 ||
+	   _hb_glyph_info_is_mark (&buffer->info[skippy_iter.idx - 1]) ||
 	   _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]) !=
 	   _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx - 1]) ||
 	   _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) !=


More information about the HarfBuzz mailing list