diff --git a/src/hb-set.hh b/src/hb-set.hh index f6013a414..e78099e34 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -120,6 +120,13 @@ struct hb_sparseset_t hb_sparseset_t& operator << (const hb_codepoint_pair_t& range) { add_range (range.first, range.second); return *this; } + bool intersects (const hb_set_t &other) const + { + hb_sparseset_t tmp = *this; + tmp.intersect (other); + return !tmp.is_empty (); + } + bool intersects (hb_codepoint_t first, hb_codepoint_t last) const { return s.intersects (first, last); }