diff --git a/src/hb-buffer-deserialize-text-glyphs.hh b/src/hb-buffer-deserialize-text-glyphs.hh index 940d2432d..41e0da2d5 100644 --- a/src/hb-buffer-deserialize-text-glyphs.hh +++ b/src/hb-buffer-deserialize-text-glyphs.hh @@ -32,7 +32,7 @@ #include "hb.hh" -#line 33 "hb-buffer-deserialize-text-glyphs.hh" +#line 36 "hb-buffer-deserialize-text-glyphs.hh" static const unsigned char _deserialize_text_glyphs_trans_keys[] = { 0u, 0u, 35u, 124u, 48u, 57u, 93u, 124u, 45u, 57u, 48u, 57u, 35u, 124u, 45u, 57u, 48u, 57u, 35u, 124u, 35u, 124u, 35u, 124u, 48u, 57u, 35u, 124u, 45u, 57u, 48u, 57u, @@ -294,12 +294,12 @@ _hb_buffer_deserialize_text_glyphs (hb_buffer_t *buffer, hb_glyph_info_t info = {0}; hb_glyph_position_t pos = {0}; -#line 291 "hb-buffer-deserialize-text-glyphs.hh" +#line 298 "hb-buffer-deserialize-text-glyphs.hh" { cs = deserialize_text_glyphs_start; } -#line 294 "hb-buffer-deserialize-text-glyphs.hh" +#line 303 "hb-buffer-deserialize-text-glyphs.hh" { int _slen; int _trans; @@ -457,7 +457,7 @@ _resume: return false; } break; -#line 428 "hb-buffer-deserialize-text-glyphs.hh" +#line 461 "hb-buffer-deserialize-text-glyphs.hh" } _again: @@ -478,7 +478,7 @@ _again: *end_ptr = p; } break; -#line 447 "hb-buffer-deserialize-text-glyphs.hh" +#line 482 "hb-buffer-deserialize-text-glyphs.hh" } } diff --git a/src/hb-ot-layout.hh b/src/hb-ot-layout.hh index ddec57e06..a42212f29 100644 --- a/src/hb-ot-layout.hh +++ b/src/hb-ot-layout.hh @@ -431,6 +431,7 @@ _hb_glyph_info_set_aat_deleted (hb_glyph_info_t *info) { _hb_glyph_info_set_general_category (info, HB_UNICODE_GENERAL_CATEGORY_FORMAT); info->unicode_props() |= UPROPS_MASK_Cf_AAT_DELETED; + info->unicode_props() |= UPROPS_MASK_HIDDEN; } /* lig_props: aka lig_id / lig_comp diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index b2eedb027..6ddf7982b 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -427,8 +427,13 @@ position_cluster (const hb_ot_shape_plan_t *plan, /* Find mark glyphs */ unsigned int j; for (j = i + 1; j < end; j++) + { + if (_hb_glyph_info_is_hidden (&info[j]) || + _hb_glyph_info_is_default_ignorable (&info[j])) + continue; if (!_hb_glyph_info_is_unicode_mark (&info[j])) break; + } position_around_base (plan, font, buffer, i, j, adjust_offsets_when_zeroing); @@ -455,7 +460,9 @@ _hb_ot_shape_fallback_mark_position (const hb_ot_shape_plan_t *plan, unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; for (unsigned int i = 1; i < count; i++) - if (likely (!_hb_glyph_info_is_unicode_mark (&info[i]))) { + if (likely (!_hb_glyph_info_is_unicode_mark (&info[i]) && + !_hb_glyph_info_is_hidden (&info[i]) && + !_hb_glyph_info_is_default_ignorable (&info[i]))) { position_cluster (plan, font, buffer, start, i, adjust_offsets_when_zeroing); start = i; } diff --git a/test/shape/data/in-house/tests/fallback-positioning.tests b/test/shape/data/in-house/tests/fallback-positioning.tests index 4c52d533d..3dad07486 100644 --- a/test/shape/data/in-house/tests/fallback-positioning.tests +++ b/test/shape/data/in-house/tests/fallback-positioning.tests @@ -1,2 +1,5 @@ ../fonts/8228d035fcd65d62ec9728fb34f42c63be93a5d3.ttf;;U+0078,U+0301,U+0058,U+0301;[x=0+1030|acutecomb=0@-19,-27+0|X=2+1295|acutecomb=2@-151,320+0] ../fonts/856ff9562451293cbeff6f396d4e3877c4f0a436.ttf;;U+0061,U+035C,U+0062;[uni0061=0+512|uni035C=0@0,-128+0|uni0062=2+512] + +# https://github.com/harfbuzz/harfbuzz/issues/5232 +/System/Library/Fonts/LucidaGrande.ttc@6a2bc87f4f4dbc5a8afb790e77842e8732216c22;;U+05E8,U+05B0,U+05EA,U+05BC,U+05B4,U+05D9,U+05D5;[vavhebrew=6+655|yodhebrew=5+650|hiriqhebrew=2@81,0+0|tavdageshhebrew=2+1421|reshshevahebrew=0+1044]