)]}'
{
  "commit": "fc2f6405a72cbc2264f39f29a2b1cdebaa672ef4",
  "tree": "7db36d181be8543599e166f7c67c55025e00630c",
  "parents": [
    "5b8f48160347885f76f679b39f31aa48bfc4f8bd"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 22:16:39 2026 -0600"
  },
  "committer": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 22:33:30 2026 -0600"
  },
  "message": "[vector] Write the ends of SVG gradients that repeat more finely\n\nAn SVG gradient that repeats or reflects goes on in periods as long\nas it is written.  hb-vector wrote its two ends like everything else,\nto two decimals by default, and the hb-vector tool writes 64 font\nunits as 1: the length of a gradient could be two thirds of a font\nunit off, and its Nth period N times that.\n\nA radial gradient that reflects from a radius of 62.5 font units to\none of 100 was written as from 0.98 to 1.56, a hundredth short, and\n33 periods on its rings were two pixels out of place at 160 pixels\nper em, where a period is six pixels.\n\nWrite the ends of such a gradient as finely as the scale of a\ntransform: to seven decimals, or to the precision set if that is\nmore.  A gradient that pads has no periods; it is written as before.\n\nTesting: a new test checks what is written for linear and radial\ngradients of each kind, and fails without the change.  For a font of\neight glyphs whose gradients are 13 to 41 font units long, four of\nwhich repeat or reflect 37 to 88 times across the glyph, how many\npixels of hb-vector\u0027s SVG are off by more than 24 levels from\nhb-raster in Chrome, at 160 and at 512 pixels per em:\n\n                        before        after\n  linear, repeat        17%, 23%      none\n  linear, reflect       10%, 47%      none\n  radial, repeat         7%,  9%      none\n  radial, reflect       27%, 57%      none\n\nlibrsvg is within half a percent of Chrome in each.  The four that\npad come out the same before and after.\n\nSix fonts of 240 random COLR glyphs each, on top of the other fixes\nto hb-vector that are in review: of the 1377 glyphs that paint\nanything, 1368 matched hb-raster in Chrome before and 1376 do now.\nNone got worse.\n\nOf the 1553 mapped glyphs of the COLR test fonts, 106 have such a\ngradient and are written differently, in SVG; the rest, and all PDF\noutput, are byte for byte as before.  Those 106 have few periods:\nthe 70 of them in test_glyphs-glyf_colr_1.ttf, bad_colrv1.ttf and\ncolr-negative-radii.ttf matched in Chrome before, and do now.\n\nFound with a font of random COLR glyphs.  The test and the vector\nfuzzer are clean under ASan and UBSan, and the test under MSan; three\nminutes of fuzzing with coverage and failing allocations (6 jobs, 212\nthousand runs) found nothing.  Full test suite passes.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "61f49e1dcdf7591facc119dcc35b497f9c18704d",
      "old_mode": 33188,
      "old_path": "src/hb-vector-paint-svg.cc",
      "new_id": "da94636e839f19c729523bafb7aa6236b4e850e4",
      "new_mode": 33188,
      "new_path": "src/hb-vector-paint-svg.cc"
    },
    {
      "type": "modify",
      "old_id": "8d9a9dd1c54168389dae2a815479849b2253d062",
      "old_mode": 33188,
      "old_path": "test/vector/meson.build",
      "new_id": "36818a994f6c6fae48de7505847e709b1e484f44",
      "new_mode": 33188,
      "new_path": "test/vector/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "31a56d840c27d6f9cf43846168a70bd573f3996c",
      "new_mode": 33188,
      "new_path": "test/vector/test-vector-svg-repeat.c"
    }
  ]
}
