mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
[subset] Use strict comparisons in avar2 region culling
The support scalar is 1 (not 0) at v == peak, so a tent whose peak sits exactly on the reachable-range boundary is live there. The ranges' one-unit padding at their producer already prevented wrong culling in practice; strictness makes the predicate correct on its own terms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eaf1536c11
commit
02cfe421c8
1 file changed
+6
-1
@@ -2830,7 +2830,12 @@ _hb_avar2_region_is_dead (const hb_hashmap_t<hb_tag_t, Triple> &axis_tuples,
|
||||
if (start < 0 && end > 0) continue;
|
||||
int lo = (int) roundf ((float) range->minimum * 16384.f);
|
||||
int hi = (int) roundf ((float) range->maximum * 16384.f);
|
||||
if (hi <= start || lo >= end)
|
||||
/* Strict comparisons: the scalar is 1 (not 0) at v == peak, so a tent
|
||||
* whose peak sits exactly on the range boundary is still live there.
|
||||
* (Reachable ranges are padded by one F2Dot14 unit at their producer,
|
||||
* which already covers this; strictness keeps the predicate correct on
|
||||
* its own terms.) */
|
||||
if (hi < start || lo > end)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user