mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[aat] Mark in-place deleted glyph replacements
Contextual and non-contextual AAT subtables replace glyphs in place. When such a replacement produced the AAT deleted glyph, we changed only the glyph ID and did not set the AAT-deleted metadata that later cleanup uses to remove deleted glyphs from the buffer. Make replace_glyph_inplace() match the other AAT replacement helpers by setting the deleted scratch flag and glyph-info marker for glyph 0xFFFF. Testing: - b/util/hb-shape CharcoalCY.dfont --unicodes=002D,002D - b/util/hb-shape CharcoalCY.dfont Empty-handed - meson test -Cb Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
20bc59869e
commit
f9d86e2d73
1 file changed
+5
@@ -228,6 +228,11 @@ struct hb_aat_apply_context_t :
|
||||
void replace_glyph_inplace (unsigned i, hb_codepoint_t glyph)
|
||||
{
|
||||
buffer->info[i].codepoint = glyph;
|
||||
if (glyph == DELETED_GLYPH)
|
||||
{
|
||||
buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_AAT_HAS_DELETED;
|
||||
_hb_glyph_info_set_aat_deleted (&buffer->info[i]);
|
||||
}
|
||||
if (likely (using_buffer_glyph_set))
|
||||
buffer_glyph_set->add (glyph);
|
||||
#ifndef HB_NO_OT_LAYOUT
|
||||
|
||||
Reference in new issue
Block a user