-
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
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070) #5095
Conversation
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/6ed19823f2dcdb8/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/6ed19823f2dcdb8/output.txt Total script time: 0.73 mins Published
|
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/6e88c55bbe05183/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/59a7916bf2a08ed/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/6e88c55bbe05183/output.txt Total script time: 19.85 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/59a7916bf2a08ed/output.txt Total script time: 23.27 mins
|
@@ -4313,26 +4314,41 @@ var Font = (function FontClosure() { | |||
var glyphName = encoding[charcode]; | |||
// b) Look up the character name in the Adobe Glyph List (see the | |||
// Bibliography) to obtain the corresponding Unicode value. | |||
if (glyphName === '' || !(glyphName in GlyphsUnicode)) { | |||
if (glyphName === '' || GlyphsUnicode[glyphName] === undefined) { | |||
// (undocumented) c) Few heuristics to recognize unknown glyphs | |||
// NOTE: Adobe Reader does not do this step, but OSX Preview does | |||
var code; |
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.
Could you assign it to 0
or null
?
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.
Done; I've also factored out the glyphName === ''
case to avoid all of the, in this case, unnecessary heuristics.
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/5557e563f0bc0cd/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/8e45a7e3a897823/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/8e45a7e3a897823/output.txt Total script time: 2.83 mins
Image differences available at: http://107.22.172.223:8877/8e45a7e3a897823/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/5557e563f0bc0cd/output.txt Total script time: 22.75 mins
|
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/a8ddbcd3771c6ab/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/a8ddbcd3771c6ab/output.txt Total script time: 19.72 mins
|
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/273eabf835cc56b/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/02b52725ceec492/output.txt |
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
Looks good. Thank you! |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/273eabf835cc56b/output.txt Total script time: 19.79 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/02b52725ceec492/output.txt Total script time: 22.61 mins
|
Fixes #5070.