)]}'
{
  "commit": "8839395a3d0b2838263be823bb9e41852a5f2a2b",
  "tree": "f2fd382b1cab5c3ed7049fd67ad92af6d293ad4a",
  "parents": [
    "5b8f48160347885f76f679b39f31aa48bfc4f8bd"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 13:33:35 2026 -0600"
  },
  "committer": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 14:11:27 2026 -0600"
  },
  "message": "[vector] Keep the alpha of a PDF fill out of what is painted next\n\nThe PDF paint writer sets the alpha of a translucent color through\nan ExtGState, and the soft mask of a gradient whose stops have alpha\nthe same way.  Neither was undone, so both stayed in the graphics\nstate for everything painted afterwards in the same clip or\ntransform, and in whatever is nested inside it.  An opaque fill\nafter a 50% one came out at 50%, and what was painted after a\ngradient that fades out faded out with it.\n\nWrap the ExtGState and the fill in q/Q, as fill_glyph and the page\nbackground already do.\n\nA COLRv1 glyph that paints a translucent PaintSolid or gradient\nstraight under its ClipBox, with other layers over it, makes these\ncalls.  None of the COLR test fonts does: over their mapped glyphs,\n43 PDFs gain a q/Q pair and none renders differently.\n\nTesting: a font made for this, with a translucent solid, linear,\nradial or sweep backdrop under the ClipBox and an opaque square over\nit.  The square was translucent in poppler (Splash and cairo),\npdfium and MuPDF for all four, and in Ghostscript for the solid\none; now it is opaque in all five, as hb-raster paints it.\n\nThe same paint calls were also replayed on hb-raster and hb-vector\nfor 300 random scenes that paint translucent backdrops before other\ncontent.  Between 20 and 26 of the PDFs had the pixels hb-raster\ngives them in those four renderers; all 300 do now.  In Ghostscript\n182 did and 294 do.  Three of the other six were reduced, each to\none linear gradient under a rotation, which Ghostscript paints\ndifferently from the other renderers before this change as well.\n\nThe new test paints each of the four fills and then something\nopaque, next to it, in a clip and in a group, and checks that no\nExtGState is set where the second is painted.  It fails on all\ntwelve without the fix.  Full test suite passes.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "22675f8a34f3127b1e4365d1803721b6369eb690",
      "old_mode": 33188,
      "old_path": "src/hb-vector-paint-pdf.cc",
      "new_id": "cad8de002947a53eccaeb263383ffad5e64796de",
      "new_mode": 33188,
      "new_path": "src/hb-vector-paint-pdf.cc"
    },
    {
      "type": "modify",
      "old_id": "8d9a9dd1c54168389dae2a815479849b2253d062",
      "old_mode": 33188,
      "old_path": "test/vector/meson.build",
      "new_id": "5581f7098acbeb5c15919eb2ab391404acc33ced",
      "new_mode": 33188,
      "new_path": "test/vector/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6782776b52b866d452bc62fbe5ec5c4aef9e1313",
      "new_mode": 33188,
      "new_path": "test/vector/test-vector-pdf-alpha.c"
    }
  ]
}
