[subset] Make ClassDef format2 .intersects() return false if range value 0
We treat Class0 as "doesn't intersect". That's the only meaningful interpretation. If one allos Class0 to mean "intersects", then the intersects() result should be true iff glyphset is non-empty. Related to https://github.com/harfbuzz/harfbuzz/issues/2703
This commit is contained in:
parent
e19de65eae
commit
3622120fab
|
@ -1969,8 +1969,11 @@ struct ClassDefFormat2
|
|||
/* TODO Speed up, using hb_set_next() and bsearch()? */
|
||||
unsigned int count = rangeRecord.len;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (rangeRecord[i].intersects (glyphs))
|
||||
{
|
||||
const auto& range = rangeRecord[i];
|
||||
if (range.intersects (glyphs) && range.value)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool intersects_class (const hb_set_t *glyphs, uint16_t klass) const
|
||||
|
|
Loading…
Reference in New Issue