-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Remove the ignoreErrors
option from the FontFaceObject
class
#18066
Remove the ignoreErrors
option from the FontFaceObject
class
#18066
Conversation
- The `stopAtErrors` API option, which is the inverse of the "internal" `ignoreErrors` option, is explicitly documented as applying to *parsing* (i.e. the worker-thread) while the `FontFaceObject` class is used during rendering (i.e. the main-thread); see https://github.com/mozilla/pdf.js/blob/b6765403a1b08aa80a21cb0809741875a925ab4d/src/display/api.js#L164-L167 - A glyph that fails in the `FontRendererFactory`, on the worker-thread, will already cause (overall) parsing to stop when `ignoreErrors === false` hence checking the option on the main-thread as well seems redundant; see https://github.com/mozilla/pdf.js/blob/b6765403a1b08aa80a21cb0809741875a925ab4d/src/core/evaluator.js#L4527-L4533 - Removing this option simplifies the code, and slightly reduces the number of options that we need to handle in the main-thread code.
/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/62f5af02a7e7642/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/62f5af02a7e7642/output.txt Total script time: 27.45 mins
Image differences available at: http://54.241.84.105:8877/62f5af02a7e7642/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.
r=me, with passing Windows tests once the bot is working again (since this might, although not very likely, differ between Linux and Windows). Thank you!
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/c9cce03005fa799/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/c9cce03005fa799/output.txt Total script time: 42.63 mins
Image differences available at: http://54.193.163.58:8877/c9cce03005fa799/reftest-analyzer.html#web=eq.log |
The small movement in various XFA reference-tests look like the usual fallout from Firefox being updated (in this case to version 128) on the bots. /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/e8c7d6cda5c94d0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/d7d048fab6984f8/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/e8c7d6cda5c94d0/output.txt Total script time: 20.05 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/d7d048fab6984f8/output.txt Total script time: 25.40 mins
|
The
stopAtErrors
API option, which is the inverse of the "internal"ignoreErrors
option, is explicitly documented as applying to parsing (i.e. the worker-thread) while theFontFaceObject
class is used during rendering (i.e. the main-thread); seepdf.js/src/display/api.js
Lines 164 to 167 in b676540
A glyph that fails in the
FontRendererFactory
, on the worker-thread, will already cause (overall) parsing to stop whenignoreErrors === false
hence checking the option on the main-thread as well seems redundant; seepdf.js/src/core/evaluator.js
Lines 4527 to 4533 in b676540
Removing this option simplifies the code, and slightly reduces the number of options that we need to handle in the main-thread code.