{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/8681","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/8681/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/8681/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/8681/events","html_url":"https://github.com/mozilla/pdf.js/pull/8681","id":244533220,"number":8681,"title":"Fix several issues with glyph id mappings.","user":{"login":"brendandahl","id":942640,"avatar_url":"https://avatars0.githubusercontent.com/u/942640?v=4","gravatar_id":"","url":"https://api.github.com/users/brendandahl","html_url":"https://github.com/brendandahl","followers_url":"https://api.github.com/users/brendandahl/followers","following_url":"https://api.github.com/users/brendandahl/following{/other_user}","gists_url":"https://api.github.com/users/brendandahl/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandahl/subscriptions","organizations_url":"https://api.github.com/users/brendandahl/orgs","repos_url":"https://api.github.com/users/brendandahl/repos","events_url":"https://api.github.com/users/brendandahl/events{/privacy}","received_events_url":"https://api.github.com/users/brendandahl/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":13,"created_at":"2017-07-21T00:31:23Z","updated_at":"2017-08-02T15:28:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/8681","html_url":"https://github.com/mozilla/pdf.js/pull/8681","diff_url":"https://github.com/mozilla/pdf.js/pull/8681.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/8681.patch"},"body":"The initial issue with #8255 was I added a missing glyphs\r\ncheck to adjustMapping, but this caused us to skip re-mapping\r\na glyph if the fontCharCode was a missingGlyph which in turn\r\ncaused us to overwrite a valid glyph id with an invalid one. While\r\nfixing this, I also added a warning if the private use area is full since\r\nthis also accidentally happened when I made a different mistake.\r\n\r\nThis brought to light a number of issues where we map\r\nmissing glyphs to notdef, but often the notdef is actually defined\r\nand then ends up being drawn. Now the glyphs don't get\r\nmapped in toFontChar and so they are not drawn by the canvas.\r\n\r\nFixing the above brought up another issue though in bug1050040.pdf.\r\nIn this PDF, the font fails to load by the browser and before we were still\r\ndrawing the glyphs because it looked like the font had them, but with the fixes\r\nabove the glyphs showed up as missing so we didn't attempt draw them. To\r\nfix this, I now throw an error when the loca table is in really bad shape and\r\nwe fall back to trying to use a system font. We now also use this fall back if\r\nthere are any format errors during converting fonts.\r\n\r\nI expect this to fix:\r\n\r\nfirefox-issue1049-page2\r\nfirefox-issue1049-page3\r\nfirefox-issue8187-page1\r\nfirefox-bug1354114-page30\r\n"},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/319707700","html_url":"https://github.com/mozilla/pdf.js/pull/8681#issuecomment-319707700","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/8681","id":319707700,"user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars0.githubusercontent.com/u/2692120?v=4","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},"created_at":"2017-08-02T15:28:24Z","updated_at":"2017-08-02T15:28:24Z","body":"> Hmm....well now the following fixes don't work, but the original regression, issue8187, is at least fixed.\r\n> \r\n> firefox-issue1049-page2\r\n> firefox-issue1049-page3\r\n> firefox-bug1354114-page30\r\n\r\nDo you want to try and fix the above files in this PR, or would a follow-up PR be better?\r\nIt would be really nice to get this landed, since it fixes issue #8668 and [bug 1383504](https://bugzilla.mozilla.org/show_bug.cgi?id=1383504) which are regressions!"}}
{"actor":{"display_login":"Snuffleupagus"}}