mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
SVG <stop offset="..."> requires offsets in [0, 1]. Out-of- range stops were silently clamped by browsers, producing visually wrong gradients for COLR fonts whose color lines extend past those bounds. Use the centralized hb_paint_normalize_color_line() to rescale stops in place; shift the gradient axis (linear) / centers and radii (radial) / start+end angles (sweep) by (mn, mx) along the gradient axis to keep the visible gradient in the same place. Drop the now-unused local hb_vector_color_stop_cmp -- the shared normalize helper sorts internally. Regenerate the two affected basic.tests expected SVGs. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>