mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 22:11:04 +01:00
Rounding relative charstring operands independently accumulates errors, opening contours and displacing stem hints after instancing. Track absolute outline coordinates and stem edges, round their defaults and surviving variation deltas, then emit relative operands again. Preserve compact path operators. Conservatively retain relative rounding for every glyph containing flex1, avoiding variation-dependent direction analysis. Leave charstrings without blends unchanged. Add a generated regression font covering closed contours, compact curves, flexes, masks, and fractional static operands. Check full and partial instances, contour closure, point accuracy, and the flex1 fallback. Refresh the existing serialized CFF expectations. Testing: the complete Meson suite passes (294 passed, one skipped), as do the CFF2 API tests under ASan and UBSan. See-also: https://github.com/fonttools/fonttools/pull/4338 Assisted-by: OpenAI Codex