diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index c01e9c173..a26cc4f09 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -51,6 +51,11 @@ get_lig_comp (const hb_glyph_info_t &info) { return info.lig_props() & 0x0F; } +static inline bool +is_a_ligature (const hb_glyph_info_t &info) +{ + return unlikely (get_lig_id (info) && ~get_lig_comp (info)); +} static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) { uint8_t lig_id = buffer->next_serial () & 0x0F; diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 7af722364..8b1d97577 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -201,7 +201,7 @@ static inline bool is_one_of (const hb_glyph_info_t &info, unsigned int flags) { /* If it ligated, all bets are off. */ - if (unlikely (get_lig_id (info))) return false; + if (is_a_ligature (info)) return false; return !!(FLAG (info.indic_category()) & flags); }