mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
Release the face lock around solid, gradient, and custom palette callbacks. Keep lazy FreeType color-stop reads locked and give each getter call its own iterator, so callbacks can query the same font without deadlocking or disturbing another stop query. Snapshot the selected palette once per COLRv1 traversal, shared by the bounds and paint passes. Nested paints can select a different palette on the face; they must not change the outer paint's colors. Return failure if the palette copy cannot be allocated. Stops remain lazy and no cache policy or limits change. Add a bounded callback regression with the existing COLRv1 fixture. It queries font extents, performs nested paints with another palette, and checks repeated and paged stop reads against the OT backend. The original code times out; unlocking without copying the palette fails the color comparison. The full Meson suite passes: 274 tests, no failures. Reported by Anthropic's OSS Scanner as ANT-2026-YPLDSFHA. Assisted-by: OpenAI Codex