Files
Behdad Esfahbod 2b1e11ee50 [subset] Use serialized contour coordinates for IUP optimization (#6547)
A shifted default can leave fractional contour coordinates that round to
identical positions in glyf. Selecting IUP references against those
fractions can omit deltas that no longer interpolate correctly after
serialization. The reported four-point case loses 499 units.

Round the real contour points after merging default deltas and before
selecting IUP references. The gvar caller already uses a private point
copy, so the plan's coordinates and metric calculations stay intact.
Leave the four phantom points unrounded.

Add a tuple-store regression covering both axes and signs, and regenerate
six affected subset expectations. The reported fixture now reconstructs
exactly. All nine checked optimized fixtures stay within the existing
0.5-unit tolerance against optimization-disabled output, with unchanged
non-gvar tables apart from the head checksum.

Testing: meson test -C build (276 passed).

Fixes: https://github.com/harfbuzz/harfbuzz/issues/6462
Reported-by: olsklcode
Assisted-by: OpenAI Codex
2026-11-01 19:29:45 -07:00
..