From dc048b7c8818cbbea02fdb49fb08ffea6a5cb471 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 7 Mar 2025 16:16:51 -0700 Subject: [PATCH] [aat/morx] Set glyph props consistently --- src/hb-aat-layout-common.hh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index f8e829834..e2ac53f6f 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -118,14 +118,21 @@ struct hb_aat_apply_context_t : { for (unsigned int i = 0; i < count; i++) { - if (unlikely (!buffer->output_glyph (glyphs[i]))) return false; if (glyphs[i] == DELETED_GLYPH) { buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES; - _hb_glyph_info_set_default_ignorable (&buffer->prev()); + _hb_glyph_info_set_default_ignorable (&buffer->cur()); } else + { buffer_glyph_set.add (glyphs[i]); +#ifndef HB_NO_OT_LAYOUT + if (has_glyph_classes) + _hb_glyph_info_set_glyph_props (&buffer->cur(), + gdef.get_glyph_props (glyphs[i])); +#endif + } + if (unlikely (!buffer->output_glyph (glyphs[i]))) return false; } return true; } @@ -136,6 +143,11 @@ struct hb_aat_apply_context_t : return delete_glyph (); buffer_glyph_set.add (glyph); +#ifndef HB_NO_OT_LAYOUT + if (has_glyph_classes) + _hb_glyph_info_set_glyph_props (&buffer->cur(), + gdef.get_glyph_props (glyph)); +#endif return buffer->replace_glyph (glyph); }