From 1c50a88623a881a9e2b2b0f1f6a783962626f03a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 18 Feb 2018 15:57:09 -0800 Subject: [PATCH] Readjust mark attachment heuristic a bit more Previously adjusted logic could fail if nothing around was ligated, and something moved. This should take care of that. CC https://github.com/harfbuzz/harfbuzz/issues/740 --- src/hb-ot-layout-gpos-table.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 5b1bc6abd..4e1a10d77 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1079,7 +1079,10 @@ struct MarkBasePosFormat1 0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) || (skippy_iter.idx == 0 || _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_id (&buffer->info[skippy_iter.idx - 1]) || + _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) != + _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx - 1]) + 1 + )) break; skippy_iter.reject (); } while (1);