[indic] Move a couple of functions to .cc file
This commit is contained in:
parent
165ef55e57
commit
9e3917f6d6
|
@ -72,6 +72,20 @@ set_indic_properties (hb_glyph_info_t &info)
|
||||||
info.indic_position() = (indic_position_t) (type >> 8);
|
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
|
struct hb_indic_would_substitute_feature_t
|
||||||
{
|
{
|
||||||
void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_)
|
void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_)
|
||||||
|
|
|
@ -102,7 +102,6 @@ enum ot_category_t {
|
||||||
*
|
*
|
||||||
* Keep in sync with consonant_categories in the generator. */
|
* 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 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. */
|
/* 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);
|
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
|
static inline bool
|
||||||
is_consonant (const hb_glyph_info_t &info)
|
is_consonant (const hb_glyph_info_t &info)
|
||||||
{
|
{
|
||||||
return is_one_of (info, CONSONANT_FLAGS);
|
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 */
|
#endif /* HB_OT_SHAPER_INDIC_HH */
|
||||||
|
|
Loading…
Reference in New Issue