{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/7920","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7920/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7920/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7920/events","html_url":"https://github.com/mozilla/pdf.js/pull/7920","id":197833335,"number":7920,"title":"Improve the handling of `Encoding` dictionary, with `Differences` array, in `PartialEvaluator_preEvaluateFont`","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":[{"id":186442,"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-font-conversion","name":"4-font-conversion","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-28T10:45:59Z","updated_at":"2016-12-28T11:15:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7920","html_url":"https://github.com/mozilla/pdf.js/pull/7920","diff_url":"https://github.com/mozilla/pdf.js/pull/7920.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/7920.patch"},"body":"I recently happened to look at the code I wrote for PR #5964, which fixed [bug 1157493](https://bugzilla.mozilla.org/show_bug.cgi?id=1157493), and I quickly realized that the solution is way too simplistic.\r\nThe fact that only using the `length` of a `Differences` array worked seems more like a happy accident for a particular set of font data, but could just as easily be incorrect for other PDF files.\r\n\r\nNote that in practice, the case where the `Encoding` entry is a regular `Dict` (and not a `Ref` or `Name`) is very rare, hence I don't think that we really need to worry about having to reparse this data.\r\nAlso, the performance of this code-block is quite a bit better by updating the `hash` with the data from the *entire* `Differences` array, instead of at every loop iteration."},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/269463316","html_url":"https://github.com/mozilla/pdf.js/pull/7920#issuecomment-269463316","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7920","id":269463316,"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":"2016-12-28T11:15:20Z","updated_at":"2016-12-28T11:15:20Z","body":"#### From: Bot.io (Linux)\n\n----\n\n# Success\n\nFull output at http://107.21.233.14:8877/d39d1e2929f7b15/output.txt\n\nTotal script time: 25.79 mins\n\n+ **Font tests:** Passed\n+ **Unit tests:** Passed\n+ **Regression tests:** Passed"}}
{"actor":{"display_login":"pdfjsbot"}}