{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/9961","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9961/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9961/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9961/events","html_url":"https://github.com/mozilla/pdf.js/pull/9961","id":347606045,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MTg1NjQ1","number":9961,"title":"Parse the font file to determine the correct type/subtype, rather than relying on the (often incorrect) data in the font dictionary","user":{"login":"Snuffleupagus","id":2692120,"node_id":"MDQ6VXNlcjI2OTIxMjA=","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},"labels":[{"id":186442,"node_id":"MDU6TGFiZWwxODY0NDI=","url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-font-conversion","name":"4-font-conversion","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-08-04T09:56:37Z","updated_at":"2018-08-05T15:30:47Z","closed_at":"2018-08-05T15:30:11Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/9961","html_url":"https://github.com/mozilla/pdf.js/pull/9961","diff_url":"https://github.com/mozilla/pdf.js/pull/9961.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/9961.patch"},"body":"The current font type/subtype detection code is quite inconsistent/unwieldy. In some cases it will simply assume that the font dictionary is correct, in others it will somewhat \"arbitrarily\" check the actual font file (more of these cases have been added over the years to fix specific bugs).\r\n\r\nAs is evident from e.g. issue #9949, the font type/subtype detection code is continuing to cause issues. In an attempt to get rid of these hacks once and for all, this patch instead re-factors the type/subtype detection to *always* parse the font file.\r\n\r\nPlease note that, as far as I can tell, we still appear to need to rely on the composite font detection based on the font dictionary. However, even if the composite/non-composite detection would get it wrong, that shouldn't really matter too much given that there's basically only two different code-paths (for \"TrueType-like\" vs \"Type1-like\" fonts).\r\n\r\nThis PR provides a *complete* fix for issue #9949, in addition to the generally useful workaround implemented by PR #9958. Furthermore, this PR also ought to prevent any future font type/subtype detection bugs too."},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/410527806","html_url":"https://github.com/mozilla/pdf.js/pull/9961#issuecomment-410527806","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/9961","id":410527806,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDUyNzgwNg==","user":{"login":"timvandermeij","id":1993262,"node_id":"MDQ6VXNlcjE5OTMyNjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1993262?v=4","gravatar_id":"","url":"https://api.github.com/users/timvandermeij","html_url":"https://github.com/timvandermeij","followers_url":"https://api.github.com/users/timvandermeij/followers","following_url":"https://api.github.com/users/timvandermeij/following{/other_user}","gists_url":"https://api.github.com/users/timvandermeij/gists{/gist_id}","starred_url":"https://api.github.com/users/timvandermeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timvandermeij/subscriptions","organizations_url":"https://api.github.com/users/timvandermeij/orgs","repos_url":"https://api.github.com/users/timvandermeij/repos","events_url":"https://api.github.com/users/timvandermeij/events{/privacy}","received_events_url":"https://api.github.com/users/timvandermeij/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T15:30:47Z","updated_at":"2018-08-05T15:30:47Z","author_association":"CONTRIBUTOR","body":"Thank you for improving this; much more readable this way and I verified that it fixes the issue too."}}
{"actor":{"display_login":"timvandermeij"}}