diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index e2ac53f6f..fa34afaa7 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -119,10 +119,7 @@ struct hb_aat_apply_context_t : for (unsigned int i = 0; i < count; i++) { if (glyphs[i] == DELETED_GLYPH) - { - buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES; - _hb_glyph_info_set_default_ignorable (&buffer->cur()); - } + _hb_glyph_info_set_aat_deleted (&buffer->cur()); else { buffer_glyph_set.add (glyphs[i]); @@ -153,8 +150,7 @@ struct hb_aat_apply_context_t : HB_NODISCARD bool delete_glyph () { - buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES; - _hb_glyph_info_set_default_ignorable (&buffer->cur()); + _hb_glyph_info_set_aat_deleted (&buffer->cur()); return buffer->replace_glyph (DELETED_GLYPH); } diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index c984da447..16076c6f5 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -324,8 +324,7 @@ hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan, static bool is_deleted_glyph (const hb_glyph_info_t *info) { - return info->codepoint == AAT::DELETED_GLYPH && - _hb_glyph_info_is_default_ignorable (info); + return _hb_glyph_info_is_aat_deleted (info); } void diff --git a/src/hb-ot-layout.hh b/src/hb-ot-layout.hh index 52dafbba4..cf0307995 100644 --- a/src/hb-ot-layout.hh +++ b/src/hb-ot-layout.hh @@ -202,7 +202,8 @@ enum hb_unicode_props_flags_t { /* If GEN_CAT=FORMAT, top byte masks: */ UPROPS_MASK_Cf_ZWJ = 0x0100u, UPROPS_MASK_Cf_ZWNJ = 0x0200u, - UPROPS_MASK_Cf_VS = 0x0400u + UPROPS_MASK_Cf_VS = 0x0400u, + UPROPS_MASK_Cf_AAT_DELETED = 0x0800u }; HB_MARK_AS_FLAG_T (hb_unicode_props_flags_t); @@ -418,6 +419,17 @@ _hb_glyph_info_flip_joiners (hb_glyph_info_t *info) return; info->unicode_props() ^= UPROPS_MASK_Cf_ZWNJ | UPROPS_MASK_Cf_ZWJ; } +static inline bool +_hb_glyph_info_is_aat_deleted (const hb_glyph_info_t *info) +{ + return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & UPROPS_MASK_Cf_AAT_DELETED); +} +static inline void +_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; +} /* lig_props: aka lig_id / lig_comp *