-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore invalid /Encoding-entries when parsing fonts (issue 14821) #14823
Conversation
e24ba1e
to
12a0aa6
Compare
In the referenced PDF document the fonts have /Encoding-entries that are Streams (containing completely bogus data), which are thus obviously not valid here. Hence, only when `ignoreErrors` is set, we'll now ignore these corrupt /Encoding-entries and fallback to the existing code to try and infer a usable encoding. Given that this is *clearly* a case of corrupt PDF documents, there's no guarantee that this will "fix" all such cases, however it's the best that we do here and shouldn't really be worse than ignoring an entire font.
12a0aa6
to
e723da7
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.241.84.105:8877/e802f96af694074/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/e802f96af694074/output.txt Total script time: 2.63 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/89fbec71ee9084b/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/f758c1c597ca07e/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/89fbec71ee9084b/output.txt Total script time: 23.30 mins
Image differences available at: http://54.241.84.105:8877/89fbec71ee9084b/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/f758c1c597ca07e/output.txt Total script time: 24.74 mins
Image differences available at: http://54.193.163.58:8877/f758c1c597ca07e/reftest-analyzer.html#web=eq.log |
Thank you for doing this! |
In the referenced PDF document the fonts have /Encoding-entries that are Streams (containing completely bogus data), which are thus obviously not valid here.
Hence, only when
ignoreErrors
is set, we'll now ignore these corrupt /Encoding-entries and fallback to the existing code to try and infer a usable encoding.Given that this is clearly a case of corrupt PDF documents, there's no guarantee that this will "fix" all such cases, however it's the best that we do here and shouldn't really be worse than ignoring an entire font.