diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh index fe8b2074c88a46d76d686d8dd73aa7be0a2a68e4..beabe0d4ee15f9577d4b3ed3ebb0daf73ae6d46d 100644 --- a/src/hb-ot-shape-complex-indic-private.hh +++ b/src/hb-ot-shape-complex-indic-private.hh @@ -64,6 +64,18 @@ enum indic_category_t { OT_CM2 = 31 /* Consonant-Medial, second slot. */ }; +#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2)) + +/* Note: + * + * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels + * cannot happen in a consonant syllable. The plus side however is, we can call the + * consonant syllable logic from the vowel syllable function and get it all right! */ +#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE)) +#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) +#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng)) + + /* Visual positions in a syllable from left to right. */ enum indic_position_t { POS_START, diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 6f51a79780b956ed485fa0480452a7f65b9fffee..7f1606cc3362c134746ddea2645e89d2ff5609fa 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -145,28 +145,18 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) return !!(FLAG (info.indic_category()) & flags); } -#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) static inline bool is_joiner (const hb_glyph_info_t &info) { return is_one_of (info, JOINER_FLAGS); } -#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2)) - -/* Note: - * - * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels - * cannot happen in a consonant syllable. The plus side however is, we can call the - * consonant syllable logic from the vowel syllable function and get it all right! */ -#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE)) static inline bool is_consonant (const hb_glyph_info_t &info) { return is_one_of (info, CONSONANT_FLAGS); } -#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng)) static inline bool is_halant_or_coeng (const hb_glyph_info_t &info) { diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc index 50209ffb0eee9321b0ff66d6b3f74453ac4d3b21..3c540f331a62d9ca8b9f138e747580dd2971a8d3 100644 --- a/src/hb-ot-shape-complex-myanmar.cc +++ b/src/hb-ot-shape-complex-myanmar.cc @@ -157,12 +157,6 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) return !!(FLAG (info.myanmar_category()) & flags); } -/* Note: - * - * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels - * cannot happen in a consonant syllable. The plus side however is, we can call the - * consonant syllable logic from the vowel syllable function and get it all right! */ -#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CM) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_GB)) static inline bool is_consonant (const hb_glyph_info_t &info) {