mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
A paint mask can extend far beyond its destination. Auto-sizing the mask before imposing the raster dimension cap wastes pixel work and can discard the visible part of an oversized outline altogether. Intersect auto-sized masks with the destination clip box before the dimension cap, and use those clipped dimensions for work accounting. Widen the extent subtraction to cover disjoint bounds safely. Add a regression for an oversized outline enclosing a small surface, and update the sweep test to expect successful one-pixel clipping. The standalone tall-edge sweep still verifies budget exhaustion. Tested with the full configured Meson suite and the Bitcount Ink audit. The worst measured 256 px pixel work falls from 6.84B to 152M units. Assisted-by: Codex (OpenAI)