)]}'
{
  "commit": "dde1f1baee2bf2d634a97e17485dbdd54e1e73f9",
  "tree": "8e7cc5c97425297fc80633458bfa5c5cc8e880ad",
  "parents": [
    "5c6b25e2b18f6b12571b7a1148e053ef74f3f6a9"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Tue Aug 04 22:41:56 2026 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 04 22:41:56 2026 -0600"
  },
  "message": "[gpu] Assign curves to bands using quantized bounds (#6132)\n\nThe fragment shader picks one horizontal and one vertical band from\nthe fragment position and walks only that band\u0027s curve list, so a\ncurve must be listed in every band its bounding box reaches into.\n\nThe encoder computed those bounding boxes from the unquantized\ncontrol points, but the shader only ever sees the coordinates after\nthey are rounded to quarter font units.  When rounding pushed a\ncurve\u0027s extreme across a band boundary, the curve was left out of the\nband it now reached into.  Fragments landing in that sliver never saw\nthe curve, so their winding number was off by one and the pixel came\nout empty in the middle of a filled area -- a thin black line through\nthe glyph, appearing and disappearing as the font size moves the\npixel grid.\n\nThe rounding error is at most an eighth of a font unit, so this is\ninvisible for an integer-coordinate glyph rendered at its own upem.\nIt gets easy to hit when the coordinates are fractional: CFF glyphs\nafter cu2qu, or any font whose hb_font_t scale is not its upem.  With\nhb_font_set_scale(font, 163, 163), as in issue #6131, more than half\nof the glyphs of util/gpu/default-font.ttf had at least one band the\nshader could reach but that did not list the curve.\n\nCompute the bounds (and the is_horizontal/is_vertical tests) from the\nquantized control points instead, and widen the band range by 1/1024\nof a band so that the double arithmetic here cannot disagree with the\nshader\u0027s float32 band index right at a boundary.\n\nVerified with a CPU port of _hb_gpu_slug_single: comparing the banded\nlookup against a walk over every curve of the glyph, at sizes 39, 47\nand 107 with scale 163, default-font.ttf had 27 wrong pixels before\nand none after.  Encoded atlas size grows by 0.12%.\n\nAdds test_encode_band_membership, which checks the invariant directly\non the encoded blob and fails before this change.\n\nAssisted-by: Claude Opus 5 (1M context) \u003cnoreply@anthropic.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "710b145525bb5978364c77dc6540290e4395c4ff",
      "old_mode": 33188,
      "old_path": "src/hb-gpu-draw.cc",
      "new_id": "41652640e83a27bfd239a61b792120f55b0f856a",
      "new_mode": 33188,
      "new_path": "src/hb-gpu-draw.cc"
    },
    {
      "type": "modify",
      "old_id": "42ec372c202dc5b204a972dc58b7feecd2ec8e56",
      "old_mode": 33188,
      "old_path": "test/api/test-gpu.cc",
      "new_id": "c18ed48e71ccceeafbf66f6ef776b036c5ed1be2",
      "new_mode": 33188,
      "new_path": "test/api/test-gpu.cc"
    }
  ]
}
