{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/6725","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6725/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6725/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6725/events","html_url":"https://github.com/mozilla/pdf.js/pull/6725","id":120548978,"number":6725,"title":"Fix the `charCodeOf` method in `IdentityToUnicodeMap` in order to prevent text selection from breaking","user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-font-conversion","name":"4-font-conversion","color":"ededed"},{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-text-selection","name":"4-text-selection","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-05T11:41:03Z","updated_at":"2015-12-05T13:07:28Z","closed_at":"2015-12-05T12:47:05Z","pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6725","html_url":"https://github.com/mozilla/pdf.js/pull/6725","diff_url":"https://github.com/mozilla/pdf.js/pull/6725.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/6725.patch"},"body":"After PR #6590, `font.spaceWidth` is now called in more cases than before (in `PartialEvaluator_getTextContent`), which exposed an underlying issue with `IdentityToUnicodeMap_charCodeOf` throwing an error.\r\nThis breaks text-selection in some PDF files found in the wild, hence this patch replaces the `error` with an actual function instead (modelled after `IdentityCMap_charCodeOf`).\r\n\r\n**Edit:** An example is the PDF file in https://bugzilla.mozilla.org/show_bug.cgi?id=1020380.\r\n\r\n**Edit2:** Pushed a new version that *only* updates the commit message, to fix the stupid `charCodeAt` -> `charCodeOf` typo. "},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/162183758","html_url":"https://github.com/mozilla/pdf.js/pull/6725#issuecomment-162183758","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6725","id":162183758,"user":{"login":"pdfjsbot","id":1036361,"avatar_url":"https://avatars.githubusercontent.com/u/1036361?v=3","gravatar_id":"","url":"https://api.github.com/users/pdfjsbot","html_url":"https://github.com/pdfjsbot","followers_url":"https://api.github.com/users/pdfjsbot/followers","following_url":"https://api.github.com/users/pdfjsbot/following{/other_user}","gists_url":"https://api.github.com/users/pdfjsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/pdfjsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdfjsbot/subscriptions","organizations_url":"https://api.github.com/users/pdfjsbot/orgs","repos_url":"https://api.github.com/users/pdfjsbot/repos","events_url":"https://api.github.com/users/pdfjsbot/events{/privacy}","received_events_url":"https://api.github.com/users/pdfjsbot/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T13:07:28Z","updated_at":"2015-12-05T13:07:28Z","body":"#### From: Bot.io (Linux)\n\n----\n\n# Success\n\nFull output at http://107.21.233.14:8877/f77e1905079fd0e/output.txt\n\nTotal script time: 20.41 mins\n\n+ **Lint:** Passed\n+ **Make references:** Passed\n+ **Check references:** Passed"}}