Skip to content

Order the corners of a COLR face's box before it bounds a paint - #739

Merged
yhay81 merged 1 commit into
mainfrom
claude/738-colr-face-box
Nov 7, 2026
Merged

yhay81 merged 1 commit into
mainfrom
claude/738-colr-face-box

Conversation

@yhay81

@yhay81 yhay81 commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Closes #738

A COLR v1 paint that no outline or clip box bounds covers the face's box,
which Colr::read took from the head table as read. A damaged face whose
head gives an axis's minimum above its maximum therefore inked, and set as
the glyph's ink, a box with its corners swapped. The colr fuzz target's
invariant ink[0] <= ink[2] && ink[1] <= ink[3] caught it in a 30-minute
local run on main (fb4aba35). The face box now orders its corners when
it is read.

The test face generator gains the colr-unclipped kind, whose four colour
glyphs paint a bare PaintSolid with nothing around it. Only that face was
generated; the other test faces are unchanged.

Acceptance

  • A test paints every glyph of a COLR face whose head box is inverted,
    and the ink of each glyph that paints orders its corners:
    a_paint_that_nothing_bounds_inks_the_face_box_corners_in_order, on
    colour-colr-unclipped.ttf, whose head reads (900, 800, 100, 0). On
    main it fails with the ink [900, 800, 100, 0].
  • The colr fuzz input that failed no longer fails:
    cargo +nightly fuzz run colr crash-025d4d96… executes it in 8 ms.

Checks

python3 tools/check.py: all passed.

🤖 Generated with Claude Code

A paint that no outline or clip box bounds covers the face's box, which
Colr::read took from `head` as read. A damaged face whose `head` gives an
axis's minimum above its maximum therefore inked a box with its corners
swapped, which the `colr` fuzz target's invariant caught.

Closes #738

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yhay81
yhay81 merged commit 02a9cd3 into main Nov 7, 2026
14 checks passed
@yhay81
yhay81 deleted the claude/738-colr-face-box branch November 7, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COLR: a face whose head box is inverted paints an inverted ink box

1 participant