)]}'
{
  "commit": "358e34f3348519636821b92302f894dd322ea65a",
  "tree": "5b3fee90d05569ca365b2a5bb6b50ead17e54029",
  "parents": [
    "a53aee8a61bb39cd69461019f6a2412634d0c2a6"
  ],
  "author": {
    "name": "April Kallmeyer",
    "email": "ask@chromium.org",
    "time": "Tue Jan 27 18:05:59 2026 -0800"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Jan 27 18:05:59 2026 -0800"
  },
  "message": "[Skia] Fix rendering text with the wrong x scale\n\nThe HasRSX() function was originally introduced in\nhttps://pdfium.googlesource.com/pdfium/+/d10d8777fa0790fd589df1eedaf0643d26260404\nThe purpose is to select between 3 different possible implementations of\ntext rendering in Skia as fast-paths depending on which combinations of\nscaling options are used per-glyph.\n\nThe three paths in 2017 were:\n\n 1. (slow path) oneAtATime \u003d\u003d true which means each glyph needs to be\n    rendered separately.\n 2. (mid path) useRSXform \u003d\u003d true which uses an array of SkRSXForm to\n    set the rotate, scale, and position of each character separately but\n    draw them all at the same time with one function call.\n 3. (fast path) All of the characters in the run have the same scale so\n    use canvas-\u003edrawPosText() after SkPaint::setTextScaleX to draw them\n    all at once\n\nSince then the code has been refactored multiple times. The #3 fast path\nabove now doesn\u0027t exist and in that case PDFium draws the characters one\nat a time using SkTextBlob::MakeFromPosText() and\ncanvas_-\u003edrawTextBlob() called per-glyph.\n\nNote: RSXform still exists but now it uses SkTextBlob::MakeFromRSXForm()\nand canvas-\u003edrawTextBlob() which together cover the whole run of text in\none call.\n\nSo essentially, this bug is caused by continuing to use the scaleX out\nparameter value from HasRSX() for the entire run of text when each\ncharacter may have different scale factors.\n\nThe fast path was updated to do one at a time rendering in\nhttps://pdfium.googlesource.com/pdfium/+/9256bd661b97a9b30c85633e73fbebf26d7fd676\n\nIt is not clear to me that the logic in HasRSX() has ever been correct\nwith respect to runs of text with different scaleX values. It\u0027s possible\nthat pattern of strings which are passed to a single\nCPDF_TextRenderer::DrawTextString() call has changed since 2017 when\nHasRSX() was originally written.\n\nFixes: 475155077\nChange-Id: Ia0a17057efd2ba08bc1275cb33ed52d2e8967645\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/141570\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\nReviewed-by: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fc529e6817b444bece04d90320c60c4babe27e65",
      "old_mode": 33188,
      "old_path": "core/fxge/skia/fx_skia_device.cpp",
      "new_id": "55030cdcb7a4642a2f3b3a34f80ba68f2af5e643",
      "new_mode": 33188,
      "new_path": "core/fxge/skia/fx_skia_device.cpp"
    },
    {
      "type": "modify",
      "old_id": "252d0a80092dc5d6d4577350461144cdf085a976",
      "old_mode": 33188,
      "old_path": "testing/resources/pixel/bug_1308_expected_skia_linux.pdf.0.png",
      "new_id": "fd6bd9d32436737e42553424c45c470eeca52d40",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/bug_1308_expected_skia_linux.pdf.0.png"
    },
    {
      "type": "modify",
      "old_id": "5b23c8f8a74e34f3c8ea6f548ac42ad9fdbf9ade",
      "old_mode": 33188,
      "old_path": "testing/resources/pixel/bug_1308_expected_skia_win.pdf.0.png",
      "new_id": "010ca198faa4d5a8ae8d13daf3d1c68f87117386",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/bug_1308_expected_skia_win.pdf.0.png"
    }
  ]
}
