)]}'
{
  "commit": "a9a287c28629e8b9b58e1cf8fa08f00a5133714d",
  "tree": "1118fb50491262a97f92ec857a723057b417ba50",
  "parents": [
    "ce5edf5cc37e004bae0e8aaec9a2d70f970997ba"
  ],
  "author": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 23:45:31 2026 -0600"
  },
  "committer": {
    "name": "Behdad Esfahbod",
    "email": "behdad@behdad.org",
    "time": "Fri Nov 20 23:45:31 2026 -0600"
  },
  "message": "[vector] Clip everything out in PDF under a transform with no inverse\n\nA COLR paint can be under a transform that has no inverse: a scale\nby zero, which a variable font can reach where something grows from\nnothing, or a matrix that puts everything onto a line.  What is\npainted under it has no area, and hb-raster paints none of it.\n\nhb-vector wrote such a transform to PDF as a `cm` like any other.\npdfium, MuPDF and Ghostscript paint nothing under it.  poppler paints\nwhat is under it as if the transform were not there: a layer that is\nnot to show came out at its full size, over the rest of the glyph.\n\nWrite no such `cm`.  Clip everything out until the transform is\npopped instead, with the empty rectangle that a clip to an outline of\nno points gets.  A transform that all but has no inverse, to one part\nin a million of its determinant, is taken the same way.\n\nSVG is left as it is: an element under a transform that has no\ninverse is not rendered, and is not in Chrome and librsvg.\n\nTesting: the test of clips to nothing also paints under four\ntransforms and checks what is written; it fails without the change.\nOf eight glyphs with a layer under a transform between two others,\npoppler had two with 58% of their pixels wrong, and of ten more one\nwith 78%; it has none of those now, and pdfium, MuPDF, Ghostscript,\nChrome and librsvg show all eighteen as before, as hb-raster does.\n\nNot covered: forty transforms one in another that each have an\ninverse and come to nothing together.  poppler still has those two of\nthe eight wrong, by 19% of their pixels.\n\nThe test and the vector fuzzer over the test fonts are clean under\nASan and UBSan, and the test under MSan.  Full test suite passes.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7334ae79bf596df44b671bf3cdc9d43003e77295",
      "old_mode": 33188,
      "old_path": "src/hb-vector-paint-pdf.cc",
      "new_id": "4b6e2de7a86e63c83a5e30e996c694e406fcbaaf",
      "new_mode": 33188,
      "new_path": "src/hb-vector-paint-pdf.cc"
    },
    {
      "type": "modify",
      "old_id": "6e5ba8624c7c5add56794b95ae9a25d123bc8c43",
      "old_mode": 33188,
      "old_path": "test/vector/test-vector-pdf-clip.c",
      "new_id": "bc04522d58e005f2f21944304a48bc32d2bd4593",
      "new_mode": 33188,
      "new_path": "test/vector/test-vector-pdf-clip.c"
    }
  ]
}
