From e9c2d78dae9c83634969dbb403df5d325da7514d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 12 Feb 2025 10:44:34 +0000 Subject: [PATCH] [buffer] Clean up some small mess --- src/gen-vowel-constraints.py | 2 +- src/hb-aat-layout-morx-table.hh | 3 ++- src/hb-ot-layout.hh | 10 +++++++--- src/hb-ot-shaper-vowel-constraints.cc | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gen-vowel-constraints.py b/src/gen-vowel-constraints.py index 3c1f6211e..adb0cc043 100755 --- a/src/gen-vowel-constraints.py +++ b/src/gen-vowel-constraints.py @@ -172,7 +172,7 @@ print ('static void') print ('_output_dotted_circle (hb_buffer_t *buffer)') print ('{') print (' (void) buffer->output_glyph (0x25CCu);') -print (' _hb_glyph_info_reset_continuation (&buffer->prev());') +print (' _hb_glyph_info_clear_continuation (&buffer->prev());') print ('}') print () print ('static void') diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 6fa510b2c..617a239fe 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -29,6 +29,7 @@ #include "hb-open-type.hh" #include "hb-aat-layout-common.hh" +#include "hb-ot-layout.hh" #include "hb-ot-layout-common.hh" #include "hb-ot-layout-gdef-table.hh" #include "hb-aat-map.hh" @@ -588,7 +589,7 @@ struct LigatureSubtable { DEBUG_MSG (APPLY, nullptr, "Skipping ligature component"); if (unlikely (!buffer->move_to (match_positions[--match_length % ARRAY_LENGTH (match_positions)]))) return; - buffer->cur().unicode_props() |= UPROPS_MASK_IGNORABLE; + _hb_glyph_info_set_default_ignorable (&buffer->cur()); if (unlikely (!buffer->replace_glyph (DELETED_GLYPH))) return; } diff --git a/src/hb-ot-layout.hh b/src/hb-ot-layout.hh index f26bf51ab..52dafbba4 100644 --- a/src/hb-ot-layout.hh +++ b/src/hb-ot-layout.hh @@ -339,6 +339,11 @@ _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info) !_hb_glyph_info_substituted (info); } static inline void +_hb_glyph_info_set_default_ignorable (hb_glyph_info_t *info) +{ + info->unicode_props() |= UPROPS_MASK_IGNORABLE; +} +static inline void _hb_glyph_info_clear_default_ignorable (hb_glyph_info_t *info) { info->unicode_props() &= ~ UPROPS_MASK_IGNORABLE; @@ -360,7 +365,7 @@ _hb_glyph_info_set_continuation (hb_glyph_info_t *info) info->unicode_props() |= UPROPS_MASK_CONTINUATION; } static inline void -_hb_glyph_info_reset_continuation (hb_glyph_info_t *info) +_hb_glyph_info_clear_continuation (hb_glyph_info_t *info) { info->unicode_props() &= ~ UPROPS_MASK_CONTINUATION; } @@ -633,8 +638,7 @@ _hb_buffer_assert_gsubgpos_vars (hb_buffer_t *buffer) } /* Make sure no one directly touches our props... */ -#undef unicode_props0 -#undef unicode_props1 +#undef unicode_props #undef lig_props #undef glyph_props diff --git a/src/hb-ot-shaper-vowel-constraints.cc b/src/hb-ot-shaper-vowel-constraints.cc index dbe781e56..a48b9b9ae 100644 --- a/src/hb-ot-shaper-vowel-constraints.cc +++ b/src/hb-ot-shaper-vowel-constraints.cc @@ -24,7 +24,7 @@ static void _output_dotted_circle (hb_buffer_t *buffer) { (void) buffer->output_glyph (0x25CCu); - _hb_glyph_info_reset_continuation (&buffer->prev()); + _hb_glyph_info_clear_continuation (&buffer->prev()); } static void