)]}'
{
  "commit": "18192fde8ddc9cb87afd8a5f1c869e73bcb3484d",
  "tree": "4d437c886847abee0823dc17fb99f0ce0dae21a7",
  "parents": [
    "9a040ad082dcebf326f23c4cf597bd73a95fbc7d"
  ],
  "author": {
    "name": "Tom Sepez",
    "email": "tsepez@chromium.org",
    "time": "Thu Jul 01 21:35:42 2021 +0000"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Jul 01 21:35:42 2021 +0000"
  },
  "message": "Fix enum type mismatch in CPDF_FontEncoding.\n\nApart from PDFFONT_ENCODING_BUILTIN and FT_ENCODING_NONE, none of\nthe PDFFONT_* definitions and FT_Encoding definitions have equivalent\nvalues. Since we pass these around as ints, it is easy to mix them up\nwithout compile-time detection. Once we re-write the FT_ functions to\ntake FT_Encoding enums, a couple of problems crop up:\n\nCPDF_Type1Font.cpp:213 (and 275) are calling with the wrong enum, but\nCPDF_FontEncoding.cpp:1810 handles a mismatched enum, but the\nmismatched enum is not the one being passed by any of the mismatched\ncallers. The result is those calls always get back a 0.\n\nSo we are left to guess intent. The FT_ENCODING_ADOBE_STANDARD enum\nmatches against our StandardEncoding table, so perhaps that was the\nintent when passing the mismatched PDFFONT_ENCODING_STANDARD value.\nAlternatively, maybe the intent was to match against the odd\nPDFFONT_ENCODING_PDFDOC case in the switch. Or it may just be that\ngetting 0 and removing dead code is the best option.\n\nThis CL tries the first option to see how it affects rendering,\nsince it the most uptight about type safety, and we remove the\nmismatched case from the switch.\n\nChange-Id: I08cf85a8adf1ddabc6c2aa4484972b262af7ee49\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/80610\nCommit-Queue: Tom Sepez \u003ctsepez@chromium.org\u003e\nReviewed-by: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c456b60eea6b857a2bf929aa1698a72a68f3cf79",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/font/cpdf_fontencoding.cpp",
      "new_id": "b7272263b2f2a036722caf9add5b399b57f4b30f",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/font/cpdf_fontencoding.cpp"
    },
    {
      "type": "modify",
      "old_id": "4ff6403ea89a2f2d11f1f99414a06243a4e9a5de",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/font/cpdf_fontencoding.h",
      "new_id": "144704209bc7ffc2f79e4c014ebc397150640ba9",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/font/cpdf_fontencoding.h"
    },
    {
      "type": "modify",
      "old_id": "90dd4dc0f1e93acc2973af7a636af140798ab516",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/font/cpdf_type1font.cpp",
      "new_id": "6ff20149860741af4f4fb6581f94d55467684eb7",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/font/cpdf_type1font.cpp"
    }
  ]
}
