-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 /CIDToGIDMap-entries when parsing fonts (issue 15139) #15192
Conversation
In the referenced PDF document the fonts have /CIDToGIDMap-entries that cannot be loaded. Hence, only when `ignoreErrors` is set, we'll now ignore these corrupt /CIDToGIDMap-entries and fallback to simply assume that no such data is available. Given that this is *clearly* a case of a corrupt PDF document, there's no guarantee that this will "fix" things in the general case since a /CIDToGIDMap may be *required* in order for some composite fonts to render correctly. However, attempting to render *something* is surely better than skipping a font altogether.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/f20ad1ef8e045db/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/20bd0aa0c7c1ea6/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/20bd0aa0c7c1ea6/output.txt Total script time: 25.83 mins
Image differences available at: http://54.241.84.105:8877/20bd0aa0c7c1ea6/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/f20ad1ef8e045db/output.txt Total script time: 28.25 mins
Image differences available at: http://54.193.163.58:8877/f20ad1ef8e045db/reftest-analyzer.html#web=eq.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/9f23e740828205a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.193.163.58:8877/3f6466d135325bd/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/3f6466d135325bd/output.txt Total script time: 4.06 mins
|
/botio-windows makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/0ef4c867dc0d03b/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/9f23e740828205a/output.txt Total script time: 22.23 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/0ef4c867dc0d03b/output.txt Total script time: 22.94 mins
|
In the referenced PDF document the fonts have /CIDToGIDMap-entries that cannot be loaded. Hence, only when
ignoreErrors
is set, we'll now ignore these corrupt /CIDToGIDMap-entries and fallback to simply assume that no such data is available.Given that this is clearly a case of a corrupt PDF document, there's no guarantee that this will "fix" things in the general case since a /CIDToGIDMap may be required in order for some composite fonts to render correctly. However, attempting to render something is surely better than skipping a font altogether.