diff --git a/src/hb-ot-shaper-indic.cc b/src/hb-ot-shaper-indic.cc index b7dda7b1b..ea9e7ae9d 100644 --- a/src/hb-ot-shaper-indic.cc +++ b/src/hb-ot-shaper-indic.cc @@ -72,6 +72,20 @@ set_indic_properties (hb_glyph_info_t &info) info.indic_position() = (indic_position_t) (type >> 8); } +#define JOINER_FLAGS (FLAG (I_Cat(ZWJ)) | FLAG (I_Cat(ZWNJ))) + +static inline bool +is_joiner (const hb_glyph_info_t &info) +{ + return is_one_of (info, JOINER_FLAGS); +} + +static inline bool +is_halant (const hb_glyph_info_t &info) +{ + return is_one_of (info, FLAG (I_Cat(H))); +} + struct hb_indic_would_substitute_feature_t { void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_) diff --git a/src/hb-ot-shaper-indic.hh b/src/hb-ot-shaper-indic.hh index 91c64badc..2aced81fb 100644 --- a/src/hb-ot-shaper-indic.hh +++ b/src/hb-ot-shaper-indic.hh @@ -102,7 +102,6 @@ enum ot_category_t { * * Keep in sync with consonant_categories in the generator. */ #define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CS) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_PLACEHOLDER) | FLAG (OT_DOTTEDCIRCLE)) -#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) /* Visual positions in a syllable from left to right. */ @@ -145,23 +144,10 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) return !!(FLAG_UNSAFE (info.indic_category()) & flags); } -static inline bool -is_joiner (const hb_glyph_info_t &info) -{ - return is_one_of (info, JOINER_FLAGS); -} - static inline bool is_consonant (const hb_glyph_info_t &info) { return is_one_of (info, CONSONANT_FLAGS); } -static inline bool -is_halant (const hb_glyph_info_t &info) -{ - return is_one_of (info, FLAG (OT_H)); -} - - #endif /* HB_OT_SHAPER_INDIC_HH */